diff --git a/common/pr_edict.c b/common/pr_edict.c index e040197..f3ea51c 100644 --- a/common/pr_edict.c +++ b/common/pr_edict.c @@ -98,6 +98,8 @@ typedef struct { static gefv_cache gefvCache[GEFV_CACHESIZE] = {{NULL, ""}, {NULL, ""}}; +func_t EndFrame; // 2000-01-02 EndFrame function by Maddes/FrikaC + #ifdef QUAKEWORLD func_t SpectatorConnect; func_t SpectatorThink; @@ -1118,6 +1120,8 @@ void PR_LoadProgs ( void ) { int i; + dfunction_t *f; // QuakeWorld Spectator Functions + // 2000-01-02 EndFrame function by Maddes/FrikaC // flush the non-C variable lookup cache for (i=0 ; iforce_retouch) pr_global_struct->force_retouch--; + +// 2000-01-02 EndFrame function by Maddes/FrikaC start + if (EndFrame) + { + // let the progs know that the frame has ended + pr_global_struct->self = EDICT_TO_PROG(sv.edicts); + pr_global_struct->other = EDICT_TO_PROG(sv.edicts); + pr_global_struct->time = sv.time; + PR_ExecuteProgram (EndFrame); + } +// 2000-01-02 EndFrame function by Maddes/FrikaC end } void diff --git a/uquake/sv_phys.c b/uquake/sv_phys.c index c16afaf..1d324c6 100644 --- a/uquake/sv_phys.c +++ b/uquake/sv_phys.c @@ -1617,6 +1617,17 @@ SV_Physics ( void ) if (pr_global_struct->force_retouch) pr_global_struct->force_retouch--; +// 2000-01-02 EndFrame function by Maddes/FrikaC start + if (EndFrame) + { + // let the progs know that the frame has ended + pr_global_struct->self = EDICT_TO_PROG(sv.edicts); + pr_global_struct->other = EDICT_TO_PROG(sv.edicts); + pr_global_struct->time = sv.time; + PR_ExecuteProgram (EndFrame); + } +// 2000-01-02 EndFrame function by Maddes/FrikaC end + sv.time += host_frametime; }