mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2025-01-30 20:58:10 +00:00
server: pass current player into SV_AddLinksToPhysents
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
869ac7711a
commit
c5068bf779
@ -1357,7 +1357,7 @@ SV_PlayerMove(const usercmd_t *cmd)
|
||||
maxs[i] = pmove.origin[i] + 256;
|
||||
}
|
||||
#if 1
|
||||
SV_AddLinksToPhysents(mins, maxs, &pestack);
|
||||
SV_AddLinksToPhysents(sv_player, mins, maxs, &pestack);
|
||||
#else
|
||||
AddAllEntsToPmove(mins, maxs, &pestack);
|
||||
#endif
|
||||
|
@ -142,8 +142,9 @@ AddLinksToPhysents
|
||||
====================
|
||||
*/
|
||||
static void
|
||||
SV_AddLinksToPhysents_r(const areanode_t *node, const vec3_t mins,
|
||||
const vec3_t maxs, physent_stack_t *pestack)
|
||||
SV_AddLinksToPhysents_r(const areanode_t *node, const edict_t *player,
|
||||
const vec3_t mins, const vec3_t maxs,
|
||||
physent_stack_t *pestack)
|
||||
{
|
||||
const link_t *link, *next;
|
||||
const link_t *const solids = &node->solid_edicts;
|
||||
@ -151,7 +152,7 @@ SV_AddLinksToPhysents_r(const areanode_t *node, const vec3_t mins,
|
||||
int i, playernum;
|
||||
physent_t *physent;
|
||||
|
||||
playernum = EDICT_TO_PROG(sv_player);
|
||||
playernum = EDICT_TO_PROG(player);
|
||||
physent = &pestack->physents[pestack->numphysent];
|
||||
|
||||
/* touch linked edicts */
|
||||
@ -165,7 +166,7 @@ SV_AddLinksToPhysents_r(const areanode_t *node, const vec3_t mins,
|
||||
if (check->v.solid == SOLID_BSP
|
||||
|| check->v.solid == SOLID_BBOX
|
||||
|| check->v.solid == SOLID_SLIDEBOX) {
|
||||
if (check == sv_player)
|
||||
if (check == player)
|
||||
continue;
|
||||
for (i = 0; i < 3; i++)
|
||||
if (check->v.absmin[i] > maxs[i]
|
||||
@ -195,16 +196,16 @@ SV_AddLinksToPhysents_r(const areanode_t *node, const vec3_t mins,
|
||||
return;
|
||||
|
||||
if (maxs[node->axis] > node->dist)
|
||||
SV_AddLinksToPhysents_r(node->children[0], mins, maxs, pestack);
|
||||
SV_AddLinksToPhysents_r(node->children[0], player, mins, maxs, pestack);
|
||||
if (mins[node->axis] < node->dist)
|
||||
SV_AddLinksToPhysents_r(node->children[1], mins, maxs, pestack);
|
||||
SV_AddLinksToPhysents_r(node->children[1], player, mins, maxs, pestack);
|
||||
}
|
||||
|
||||
void
|
||||
SV_AddLinksToPhysents(const vec3_t mins, const vec3_t maxs,
|
||||
physent_stack_t *pestack)
|
||||
SV_AddLinksToPhysents(const edict_t *player, const vec3_t mins,
|
||||
const vec3_t maxs, physent_stack_t *pestack)
|
||||
{
|
||||
SV_AddLinksToPhysents_r(sv_areanodes, mins, maxs, pestack);
|
||||
SV_AddLinksToPhysents_r(sv_areanodes, player, mins, maxs, pestack);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -90,8 +90,8 @@ SV_TraceLine(const vec3_t start, const vec3_t end, movetype_t type,
|
||||
|
||||
#if defined(QW_HACK) && defined(SERVERONLY)
|
||||
#include "pmove.h"
|
||||
void SV_AddLinksToPhysents(const vec3_t mins, const vec3_t maxs,
|
||||
physent_stack_t *pestack);
|
||||
void SV_AddLinksToPhysents(const edict_t *player, const vec3_t mins,
|
||||
const vec3_t maxs, physent_stack_t *pestack);
|
||||
#endif
|
||||
|
||||
#endif /* WORLD_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user