History

SV_PushMove: import fix from https://www.quake-info-pool.net/q1/qfix.htm#movetype_push

Sigrid Solveig Haflínudóttir committed 1 year ago

Commit 6d2cd2d1 parent bc0fe981 file · +10 −5Browse files

Unified · Split

sv_phys.c+10−5
@@ -420,7 +420,7 @@ SV_PushMove(pr_t *pr, edict_t *pusher, float movetime) · 419 unmodified lines
420{420{
421 static edict_t *moved_edict[MAX_EDICTS];421 static edict_t *moved_edict[MAX_EDICTS];
422 static vec3_t moved_from[MAX_EDICTS];422 static vec3_t moved_from[MAX_EDICTS];
423 int i, e, num_moved;423 int i, e, num_moved, solid;
424 edict_t *check, *block;424 edict_t *check, *block;
425 vec3_t mins, maxs, move, entorig, pushorig;425 vec3_t mins, maxs, move, entorig, pushorig;
426 426
@@ -476,9 +476,13 @@ SV_PushMove(pr_t *pr, edict_t *pusher, float movetime) · 49 unmodified lines
476 num_moved++;476 num_moved++;
477 477
478 // try moving the contacted entity478 // try moving the contacted entity
479 pusher->v.solid = SOLID_NOT;479 solid = pusher->v.solid;
480 SV_PushEntity(pr, check, move);480 if(solid >= SOLID_BBOX && solid <= SOLID_BSP) {
481 pusher->v.solid = SOLID_BSP;481 // https://www.quake-info-pool.net/q1/qfix.htm#movetype_push
482 pusher->v.solid = SOLID_NOT;
483 SV_PushEntity(pr, check, move);
484 pusher->v.solid = solid;
485 }
482 486
483 // if it is still inside the pusher, block487 // if it is still inside the pusher, block
484 block = SV_TestEntityPosition(pr, check);488 block = SV_TestEntityPosition(pr, check);
@@ -486,7 +490,8 @@ SV_PushMove(pr_t *pr, edict_t *pusher, float movetime) · 1 unmodified line
486 // fail the move490 // fail the move
487 if(check->v.mins[0] == check->v.maxs[0])491 if(check->v.mins[0] == check->v.maxs[0])
488 continue;492 continue;
489 if(check->v.solid == SOLID_NOT || check->v.solid == SOLID_TRIGGER) {493 solid = check->v.solid;
494 if(solid <= SOLID_TRIGGER) {
490 // corpse495 // corpse
491 check->v.mins[0] = check->v.mins[1] = 0;496 check->v.mins[0] = check->v.mins[1] = 0;
492 VectorCopy(check->v.mins, check->v.maxs);497 VectorCopy(check->v.mins, check->v.maxs);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t