#include "cl_collision.h"
-qbool PHYS_NudgeOutOfSolid(prvm_prog_t *prog, prvm_edict_t *ent)
+int PHYS_NudgeOutOfSolid(prvm_prog_t *prog, prvm_edict_t *ent)
{
int bump, pass;
trace_t stucktrace;
{
// found a good location, use it
VectorCopy(stuckorigin, PRVM_serveredictvector(ent, origin));
- return true;
+ return bump || pass ? 1 : -1; // -1 means it wasn't stuck
}
nudge = -stucktrace.startdepth;
VectorMA(stuckorigin, nudge, stucktrace.startdepthnormal, stuckorigin);
}
}
- return false;
+ return 0;
}
/*! move an entity that is stuck out of the surface it is stuck in (can move large amounts)
- * returns true if it found a better place
+ * returns 1 if it found a better place, 0 if it remains stuck, -1 if it wasn't stuck.
*/
-qbool PHYS_NudgeOutOfSolid(prvm_prog_t *prog, prvm_edict_t *ent);
+int PHYS_NudgeOutOfSolid(prvm_prog_t *prog, prvm_edict_t *ent);
extern cvar_t cl_gameplayfix_nudgeoutofsolid_separation;