diff --git a/common/world.c b/common/world.c index cada587..464066d 100644 --- a/common/world.c +++ b/common/world.c @@ -163,7 +163,7 @@ hull_t *SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset) model = sv.models[ (int)ent->v.modelindex ]; if (!model || model->type != mod_brush) - SV_Error ("MOVETYPE_PUSH with a non bsp model"); + SV_Error ("SOLID_BSP with a non bsp model"); // 1999-10-07 MOVETYPE_PUSH fix by Lord Havoc/Maddes VectorSubtract (maxs, mins, size); if (size[0] < 3) diff --git a/qw_server/sv_phys.c b/qw_server/sv_phys.c index cfbfa0e..c1d873c 100644 --- a/qw_server/sv_phys.c +++ b/qw_server/sv_phys.c @@ -462,6 +462,7 @@ SV_Push ( edict_t *pusher, vec3_t move ) int num_moved; edict_t *moved_edict[MAX_EDICTS]; vec3_t moved_from[MAX_EDICTS]; + float solid_save; // for Lord Havoc's SOLID_BSP fix --KB for (i=0 ; i<3 ; i++) { @@ -488,9 +489,12 @@ SV_Push ( edict_t *pusher, vec3_t move ) || check->v.movetype == MOVETYPE_NOCLIP) continue; + // Don't assume SOLID_BSP ! --KB + solid_save = pusher->v.solid; pusher->v.solid = SOLID_NOT; block = SV_TestEntityPosition (check); - pusher->v.solid = SOLID_BSP; + // pusher->v.solid = SOLID_BSP; + pusher->v.solid = solid_save; if (block) { // Con_Printf ("blocked.. %i\n", block); diff --git a/uquake/sv_phys.c b/uquake/sv_phys.c index 343efbb..801dc1f 100644 --- a/uquake/sv_phys.c +++ b/uquake/sv_phys.c @@ -467,6 +467,7 @@ SV_PushMove ( edict_t *pusher, float movetime ) int num_moved; edict_t *moved_edict[MAX_EDICTS]; vec3_t moved_from[MAX_EDICTS]; + float solid_backup; // 1999-10-07 MOVETYPE_PUSH fix by Lord Havoc/Maddes if (!pusher->v.velocity[0] && !pusher->v.velocity[1] && !pusher->v.velocity[2]) { @@ -531,13 +532,29 @@ SV_PushMove ( edict_t *pusher, float movetime ) moved_edict[num_moved] = check; num_moved++; - // try moving the contacted entity - pusher->v.solid = SOLID_NOT; - SV_PushEntity (check, move); - pusher->v.solid = SOLID_BSP; +// 1999-10-07 MOVETYPE_PUSH fix by Lord Havoc/Maddes start + solid_backup = pusher->v.solid; + if ( solid_backup == SOLID_BSP // everything that blocks: bsp models==map brushes==doors,plats,etc. + || solid_backup == SOLID_BBOX // normally boxes + || solid_backup == SOLID_SLIDEBOX ) // normally monsters + { +// 1999-10-07 MOVETYPE_PUSH fix by Lord Havoc/Maddes end + // try moving the contacted entity + pusher->v.solid = SOLID_NOT; + SV_PushEntity (check, move); +// 1999-10-07 MOVETYPE_PUSH fix by Lord Havoc/Maddes start +// pusher->v.solid = SOLID_BSP; + pusher->v.solid = solid_backup; +// 1999-10-07 MOVETYPE_PUSH fix by Lord Havoc/Maddes end + + // if it is still inside the pusher, block + block = SV_TestEntityPosition (check); +// 1999-10-07 MOVETYPE_PUSH fix by Lord Havoc/Maddes start + } + else + block = NULL; +// 1999-10-07 MOVETYPE_PUSH fix by Lord Havoc/Maddes end - // if it is still inside the pusher, block - block = SV_TestEntityPosition (check); if (block) { // fail the move if (check->v.mins[0] == check->v.maxs[0])