Overview
Comment: | Fix wrong argument order for calculating distance |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
75095b4f6e2b5ed05c3279c84b686252 |
User & Date: | js on 2025-03-23 22:14:48 |
Other Links: | manifest | tags |
Context
2025-03-24
| ||
21:11 | Work around conflicting declaration of gamma check-in: 7c3936be15 user: js tags: trunk | |
2025-03-23
| ||
22:14 | Fix wrong argument order for calculating distance check-in: 75095b4f6e user: js tags: trunk | |
21:52 | Avoid pointless pointers check-in: 304230c1e1 user: js tags: trunk | |
Changes
Modified src/Monster.m from [df6f0d84fe] to [9674185459].
︙ | |||
268 269 270 271 272 273 274 | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | - + | } else { self.yaw -= curtime * 0.5f; if (self.targetYaw > self.yaw) self.yaw = self.targetYaw; } float disttoenemy = |
︙ | |||
466 467 468 469 470 471 472 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - + | if (lastmillis - monster.lastAction < 2000) { monster.move = 0; moveplayer(monster, 1, false); } } else { v.z += monster.eyeHeight; float dist = |
︙ |
Modified src/entities.m from [3530688d6b] to [fe7c9a5680].
︙ | |||
317 318 319 320 321 322 323 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - + | return; if (OUTBORD(e.x, e.y)) return; OFVector3D v = OFMakeVector3D( e.x, e.y, (float)S(e.x, e.y)->floor + player1.eyeHeight); |
︙ |
Modified src/renderparticles.m from [41bd950ef0] to [c7ff826e5c].
︙ | |||
146 147 148 149 150 151 152 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - - + + | newparticle(p, d, rnd(fade * 3), type); } } void particle_trail(int type, int fade, OFVector3D s, OFVector3D e) { |
︙ |
Modified src/savegamedemo.m from [16ee4d908b] to [b93241b086].
︙ | |||
494 495 496 497 498 499 500 | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | - + | // printf("* %d\n", lastmillis); float bf = (itime - a.lastUpdate) / (float)(b.lastUpdate - a.lastUpdate); fixwrap(a, player1); fixwrap(c, player1); fixwrap(z, player1); float dist = |
︙ |
Modified src/sound.m from [1d0c412a26] to [93eb0a5b3c].
︙ | |||
110 111 112 113 114 115 116 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - - + + | static void updatechanvol(int chan, const OFVector3D *loc) { int vol = soundvol, pan = 255 / 2; if (loc) { OFVector3D origin = player1.origin; |
︙ |
Modified src/weapon.m from [7fa0099398] to [d5d4aa755b].
︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - + | (a3.length > 0 ? a3.cube_intValue : -1)); }) // create random spread of rays for the shotgun void createrays(OFVector3D from, OFVector3D to) { |
︙ | |||
181 182 183 184 185 186 187 | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | - - + + - | radialeffect( DynamicEntity *o, OFVector3D v, int cn, int qdam, DynamicEntity *at) { if (o.state != CS_ALIVE) return; OFVector3D origin = o.origin; |
︙ | |||
263 264 265 266 267 268 269 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - - - + + + - + | if (!p.inuse) continue; int qdam = guns[p.gun].damage * (p.owner.quadMillis ? 4 : 1); if ([p.owner isKindOfClass:Monster.class]) qdam /= MONSTERDAMAGEFACTOR; |
︙ | |||
346 347 348 349 350 351 352 | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | - - + + | } void hitpush(int target, int damage, DynamicEntity *d, DynamicEntity *at, OFVector3D from, OFVector3D to) { hit(target, damage, d, at); |
︙ | |||
397 398 399 400 401 402 403 | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | - - + + | } if (d.gunSelect) d.ammo[d.gunSelect]--; OFVector3D from = d.origin; OFVector3D to = targ; from.z -= 0.2f; // below eye |
︙ |
Modified src/world.m from [892a60074f] to [c2453dcf9a].
︙ | |||
294 295 296 297 298 299 300 | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | - + | __block int best; __block float bdist = 99999; [ents enumerateObjectsUsingBlock:^(Entity *e, size_t i, bool *stop) { if (e.type == NOTUSED) return; OFVector3D v = OFMakeVector3D(e.x, e.y, e.z); |
︙ |