Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions 3d-models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,6 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push,

auto gbody = body;

int it = 0;

vector<int> nextid(n);
vector<int> lastid(n);
vector<bool> stillin(n, true);
Expand All @@ -558,7 +556,6 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push,
nextid[n-1] = n-1; lastid[0] = 0;

while(true) {
it++;
int cand = -1;
ld cv = 0;
for(int i=1; i<n-1; i++) if(stillin[i]) {
Expand Down Expand Up @@ -787,7 +784,6 @@ void geometry_information::adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye
hyperpoint pscenter = psmin(center);

ld pos = 0;
int qty = 0, qtyall = 0;

vector<hyperpoint> pss;

Expand All @@ -800,8 +796,7 @@ void geometry_information::adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye
ld mindist = 1e9;
for(int i=0; i<isize(pss); i+=3) if(pss[i][2] < zmid || (WDIM == 3 && !gproduct)) {
ld d = sqhypot_d(2, pss[i]-pscenter) + sqhypot_d(2, pss[i+1]-pscenter) + sqhypot_d(2, pss[i+2]-pscenter);
if(d < mindist) mindist = d, pos = min(min(pss[i][2], pss[i+1][2]), pss[i+2][2]), qty++;
qtyall++;
if(d < mindist) mindist = d, pos = min(min(pss[i][2], pss[i+1][2]), pss[i+2][2]);
}

if(&eye == &shSkullEyes) cgi.eyelevel_human = pos = zc(eyepos) - 0.06 * SH * 0.05;
Expand Down
2 changes: 0 additions & 2 deletions barriers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,6 @@ EX bool valid_dir(const vector<char>& ad, int j, cell *c) {
int a = 0;
for(auto& dd: ad1) if(dd == 1) a++;

int a0 = 0;
for(auto& dd: ad) if(dd == 1) a0++;
return a < 6;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one still seems suspect to me.

}

Expand Down
4 changes: 1 addition & 3 deletions checkmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ EX void create_yasc_message() {
bool in_ctx = true;

set<string> blocks;
int index = 0;
for(auto c: all) {
if(c.type == miENTITY && !captures.count({c.where, blocking_monster_name(c)})) blocks.insert(blocking_monster_name(c));
else if(c.type == miWALL && c.subtype == siMONSTER && !captures.count({c.where, blocking_monster_name(c)})) blocks.insert(blocking_monster_name(c));
Expand All @@ -359,7 +358,6 @@ EX void create_yasc_message() {
else if(c.where && c.where->wall != cwt.at->wall) blocks.insert(dnameof(c.where->wall));
}
else if(c.type == siWARP) blocks.insert("warp");
index++;
}

if(!blocks.empty()) {
Expand Down Expand Up @@ -481,4 +479,4 @@ EX void checkmove() {
}


}
}
3 changes: 0 additions & 3 deletions earcut.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,8 @@ void Earcut<N>::earcutLinked(Node* ear, int pass) {
Node* prev;
Node* next;

int iterations = 0;

// iterate through ears, slicing them one by one
while (ear->prev != ear->next) {
iterations++;
prev = ear->prev;
next = ear->next;

Expand Down
5 changes: 1 addition & 4 deletions rulegen3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1288,9 +1288,6 @@ EX void test_transducers() {
swap(cum, result);
ctid = t_origin[ctid].at->cmove(c)->id;
}
int err = 0;
for(auto duc: cum) for(auto p: duc.second.t)
if(p.first.first == ENDED || p.first.second != p.first.first) err++;
throw_identity_errors(cum, cyc.dirs);
if(id_size != isize(cum)) println(hlog, "error: identity not recovered correctly");
}
Expand Down Expand Up @@ -1761,4 +1758,4 @@ auto hook3 = addHook(hooks_args, 100, readRuleArgs3);
EX }
#endif

}
}
Loading