From eb27095f734f2cd5605b6fe9e58271d95b3e4421 Mon Sep 17 00:00:00 2001 From: Lev Date: Sun, 12 Feb 2017 22:53:07 +0500 Subject: [PATCH] Fix CreateBaseline call crash under Linux and change parameters passing under Windows. --- rehlds/engine/sv_main.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 1bfe7fe..62a6416 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -5471,13 +5471,6 @@ void SV_CreateBaseline(void) * This inconsistency in the interface between gamedll and engine leads to exposure of some data from stack of caller function to vector's elements in gamedll, which, in turn, * leads to inconsistent behavior (since stack data may contain pointers) across different systems. */ -#ifdef REHLDS_FIXES - /* - * Fixed function call. - */ - typedef void CreateBaseline_t(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec_t player_mins0, vec_t player_mins1, vec_t player_mins2, vec_t player_maxs0, vec_t player_maxs1, vec_t player_maxs2); - ((CreateBaseline_t*)gEntityInterface.pfnCreateBaseline)(player, entnum, &(g_psv.baselines[entnum]), svent, sv_playermodel, player_mins[0][0], player_mins[0][1], player_mins[0][2], player_maxs[0][0], player_maxs[0][1], player_maxs[0][2]); -#else // REHLDS_FIXES /* * This function call emulates swds.dll behavior, i.e. it sends the same garbage when invoking CreateBaseline as swds.dll does. * This is required since not emulating this behavior will break rehlds test demos. @@ -5485,12 +5478,6 @@ void SV_CreateBaseline(void) typedef void CreateBaseline_t(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs, int dummy1, int dummy2, int dummy3, int dummy4); ((CreateBaseline_t*)gEntityInterface.pfnCreateBaseline)(player, entnum, &(g_psv.baselines[entnum]), svent, sv_playermodel, player_mins[0], player_maxs[0], 0, 0, 1, 0); - /* - * Bugged function call that is used in the original engine. Just for a reference. - */ - //gEntityInterface.pfnCreateBaseline(player, entnum, &(g_psv.baselines[entnum]), svent, sv_playermodel, player_mins[0], player_maxs[0]); -#endif // REHLDS_FIXES - sv_lastnum = entnum; } }