Differences From Artifact [d0a68a37a3]:
- File src/clientgame.m — part of check-in [e8f80b0482] at 2025-03-23 02:03:32 on branch trunk — Convert monster into a class (user: js, size: 9859) [annotate] [blame] [check-ins using]
To Artifact [e2809031d4]:
- File
src/clientgame.m
— part of check-in
[6b85eefc85]
at
2025-03-23 02:47:40
on branch trunk
— Remove loop[ijkl]
They confused clang-format a lot. (user: js, size: 9899) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
194 195 196 197 198 199 200 | lastmillis = millis; } // brute force but effective way to find a free spawn spot in the map void entinmap(DynamicEntity *d) { | | < > | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | lastmillis = millis; } // brute force but effective way to find a free spawn spot in the map void entinmap(DynamicEntity *d) { // try max 100 times for (int i = 0; i < 100; i++) { float dx = (rnd(21) - 10) / 10.0f * i; // increasing distance float dy = (rnd(21) - 10) / 10.0f * i; OFVector3D old = d.origin; d.origin = OFAddVector3D(d.origin, OFMakeVector3D(dx, dy, 0)); if (collide(d, true, 0, 0)) return; d.origin = old; |
︙ | ︙ | |||
217 218 219 220 221 222 223 | int fixspawn = 2; // place at random spawn. also used by monsters! void spawnplayer(DynamicEntity *d) { int r = fixspawn-- > 0 ? 4 : rnd(10) + 1; | > | | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | int fixspawn = 2; // place at random spawn. also used by monsters! void spawnplayer(DynamicEntity *d) { int r = fixspawn-- > 0 ? 4 : rnd(10) + 1; for (int i = 0; i < r; i++) spawncycle = findentity(PLAYERSTART, spawncycle + 1); if (spawncycle != -1) { d.origin = OFMakeVector3D( ents[spawncycle].x, ents[spawncycle].y, ents[spawncycle].z); d.yaw = ents[spawncycle].attr1; d.pitch = 0; d.roll = 0; } else |
︙ | ︙ |