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
420420 {
421421 static edict_t *moved_edict[MAX_EDICTS];
422422 static vec3_t moved_from[MAX_EDICTS];
423− int i, e, num_moved;
423+ int i, e, num_moved, solid;
424424 edict_t *check, *block;
425425 vec3_t mins, maxs, move, entorig, pushorig;
426426
@@ -476,9 +476,13 @@ SV_PushMove(pr_t *pr, edict_t *pusher, float movetime) · 49 unmodified lines
476476 num_moved++;
477477
478478 // try moving the contacted entity
479− pusher->v.solid = SOLID_NOT;
480− SV_PushEntity(pr, check, move);
481− pusher->v.solid = SOLID_BSP;
479+ solid = pusher->v.solid;
480+ if(solid >= SOLID_BBOX && 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+ }
482486
483487 // if it is still inside the pusher, block
484488 block = SV_TestEntityPosition(pr, check);
@@ -486,7 +490,8 @@ SV_PushMove(pr_t *pr, edict_t *pusher, float movetime) · 1 unmodified line
486490 // fail the move
487491 if(check->v.mins[0] == check->v.maxs[0])
488492 continue;
489− if(check->v.solid == SOLID_NOT || check->v.solid == SOLID_TRIGGER) {
493+ solid = check->v.solid;
494+ if(solid <= SOLID_TRIGGER) {
490495 // corpse
491496 check->v.mins[0] = check->v.mins[1] = 0;
492497 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