mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 04:01:17 +00:00
EndFrame function by FrikaC/Maddes
This commit is contained in:
parent
1cb4241fb4
commit
b72492afd3
3 changed files with 22 additions and 0 deletions
|
@ -139,6 +139,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;
|
||||
|
|
|
@ -76,6 +76,8 @@ typedef struct {
|
|||
|
||||
static gefv_cache gefvCache[GEFV_CACHESIZE] = {{NULL, ""}, {NULL, ""}};
|
||||
|
||||
func_t EndFrame; // 2000-01-02 EndFrame function by Maddes/FrikaC
|
||||
|
||||
func_t SpectatorConnect;
|
||||
func_t SpectatorThink;
|
||||
func_t SpectatorDisconnect;
|
||||
|
@ -1090,6 +1092,13 @@ void PR_LoadProgs (void)
|
|||
if ((f = ED_FindFunction ("SpectatorDisconnect")) != NULL)
|
||||
SpectatorDisconnect = (func_t)(f - pr_functions);
|
||||
|
||||
// 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
|
||||
|
||||
// LordHavoc: Ender added this
|
||||
FindEdictFieldOffsets();
|
||||
}
|
||||
|
|
|
@ -1084,6 +1084,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
|
||||
|
|
Loading…
Reference in a new issue