mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-10 06:31:56 +00:00
EndFrame function by FrikaC/Maddes
This commit is contained in:
parent
940129c153
commit
3b9a81a7ce
4 changed files with 35 additions and 2 deletions
|
@ -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 ; i<GEFV_CACHESIZE ; i++)
|
||||
|
@ -1231,8 +1235,6 @@ PR_LoadProgs ( void )
|
|||
|
||||
#ifdef QUAKEWORLD
|
||||
{
|
||||
dfunction_t *f;
|
||||
|
||||
// Zoid, find the spectator functions
|
||||
SpectatorConnect = SpectatorThink = SpectatorDisconnect = 0;
|
||||
|
||||
|
@ -1244,6 +1246,13 @@ PR_LoadProgs ( void )
|
|||
SpectatorDisconnect = (func_t)(f - pr_functions);
|
||||
}
|
||||
#endif
|
||||
|
||||
// 2000-01-02 EndFrame function by Maddes/FrikaC start
|
||||
EndFrame = 0;
|
||||
|
||||
if ((f = ED_FindFunction ("EndFrame")) != NULL)
|
||||
EndFrame = (func_t)(f - pr_functions);
|
||||
// 2000-01-02 EndFrame function by Maddes/FrikaC end
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -140,6 +140,8 @@ extern qboolean pr_trace;
|
|||
extern dfunction_t *pr_xfunction;
|
||||
extern int pr_xstatement;
|
||||
|
||||
extern func_t EndFrame; // 2000-01-02 EndFrame function by Maddes/FrikaC
|
||||
|
||||
extern func_t SpectatorConnect;
|
||||
extern func_t SpectatorThink;
|
||||
extern func_t SpectatorDisconnect;
|
||||
|
|
|
@ -975,6 +975,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
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue