Overview
Comment: | Remove vadd/vsub/vmul/vdiv |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0c8fc2f1482a22d97a114b5b35f2a4d5 |
User & Date: | js on 2025-03-23 14:49:15 |
Other Links: | manifest | tags |
Context
2025-03-23
| ||
17:41 | Remove dotprod check-in: da90479adf user: js tags: trunk | |
14:49 | Remove vadd/vsub/vmul/vdiv check-in: 0c8fc2f148 user: js tags: trunk | |
14:17 | Adjust to ObjFW changes check-in: 85566b261d user: js tags: trunk | |
Changes
Modified src/cube.h from [de779124b5] to [38ea0aa1b6].
︙ | |||
284 285 286 287 288 289 290 | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | - - - - - - + + - | #define PIXELTAB (VIRTW / 12) #define PI (3.1415927f) #define PI2 (2 * PI) // simplistic vector ops #define dotprod(u, v) ((u).x * (v).x + (u).y * (v).y + (u).z * (v).z) |
︙ |
Modified src/entities.m from [aa08365e90] to [27ea25a917].
︙ | |||
290 291 292 293 294 295 296 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | - - - + + + | case JUMPPAD: { static int lastjumppad = 0; if (lastmillis - lastjumppad < 300) break; lastjumppad = lastmillis; OFVector3D v = OFMakeVector3D((int)(char)ents[n].attr3 / 10.0f, (int)(char)ents[n].attr2 / 10.0f, ents[n].attr1 / 10.0f); |
︙ |
Modified src/physics.m from [bf839677bd] to [498044e3ca].
︙ | |||
288 289 290 291 292 293 294 | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | - - - - - + + + + + + - + | const float friction = water ? 20.0f : (pl.onFloor || floating ? 6.0f : 30.0f); const float fpsfric = friction / curtime * 20.0f; // slowly apply friction and direction to // velocity, gives a smooth movement |
︙ |
Modified src/renderparticles.m from [8491151e32] to [e9255a3806].
︙ | |||
117 118 119 120 121 122 123 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + - - - + + | *pp = p->next; p->next = parempty; parempty = p; } else { if (pt->gr) p->o.z -= ((lastmillis - p->millis) / 3.0f) * curtime / (pt->gr * 10000); |
︙ | |||
150 151 152 153 154 155 156 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - + - + | } } void particle_trail(int type, int fade, const OFVector3D *s, const OFVector3D *e) { vdist(d, v, *s, *e); |
Modified src/savegamedemo.m from [d2d1d77a28] to [3891d96448].
︙ | |||
384 385 386 387 388 389 390 | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | - - - - + + + + + - - - - - - - - + + + + + + - - - - - - - - - - + + + + + + + | setclient(democlientnum, [player1 copy]); readdemotime(); } VAR(demodelaymsec, 0, 120, 500); // spline interpolation |
︙ |
Modified src/weapon.m from [acb2ec57ac] to [da3cdeb33a].
︙ | |||
73 74 75 76 77 78 79 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - + - + - - - - - + + - + - - + | // create random spread of rays for the shotgun void createrays(const OFVector3D *from, const OFVector3D *to) { vdist(dist, dvec, *from, *to); float f = dist * SGSPREAD / 1000; |
︙ | |||
195 196 197 198 199 200 201 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | + - - + + | vdist(dist, temp, *v, o.origin); dist -= 2; // account for eye distance imprecision if (dist < RL_DAMRAD) { if (dist < 0) dist = 0; int damage = (int)(qdam * (1 - (dist / RL_DAMRAD))); hit(cn, damage, o, at); temp = |
︙ | |||
269 270 271 272 273 274 275 | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | - - + + | int qdam = guns[p.gun].damage * (p.owner.quadMillis ? 4 : 1); if ([p.owner isKindOfClass:Monster.class]) qdam /= MONSTERDAMAGEFACTOR; vdist(dist, v, p.o, p.to); float dtime = dist * 1000 / p.speed; if (time > dtime) dtime = time; |
︙ | |||
350 351 352 353 354 355 356 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | - - + + | void hitpush(int target, int damage, DynamicEntity *d, DynamicEntity *at, const OFVector3D *from, const OFVector3D *to) { hit(target, damage, d, at); vdist(dist, v, *from, *to); |
︙ | |||
400 401 402 403 404 405 406 | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - - - - + + + + - + - - + | if (d.gunSelect) d.ammo[d.gunSelect]--; OFVector3D from = d.origin; OFVector3D to = *targ; from.z -= 0.2f; // below eye vdist(dist, unitv, from, to); |
︙ |