mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Clear clipping rectangle before each hook call
Prevents Lua from being able to make a mess.
This commit is contained in:
parent
3a8b1ea8e6
commit
b50fbce5ee
2 changed files with 10 additions and 0 deletions
|
|
@ -373,6 +373,9 @@ static void D_Display(void)
|
||||||
if (dedicated) //bail out after wipe logic
|
if (dedicated) //bail out after wipe logic
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Catch runaway clipping rectangles.
|
||||||
|
V_ClearClipRect();
|
||||||
|
|
||||||
// do buffered drawing
|
// do buffered drawing
|
||||||
switch (gamestate)
|
switch (gamestate)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@
|
||||||
#include "d_netcmd.h" // for cv_perfstats
|
#include "d_netcmd.h" // for cv_perfstats
|
||||||
#include "i_system.h" // I_GetPreciseTime
|
#include "i_system.h" // I_GetPreciseTime
|
||||||
|
|
||||||
|
#include "v_video.h" // V_ClearClipRect
|
||||||
|
|
||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
ABSTRACTION
|
ABSTRACTION
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
@ -641,8 +643,13 @@ void LUA_HookHUD(huddrawlist_h list, int hook_type)
|
||||||
LUA_SetHudHook(hook_type, list);
|
LUA_SetHudHook(hook_type, list);
|
||||||
|
|
||||||
hud_running = true; // local hook
|
hud_running = true; // local hook
|
||||||
|
|
||||||
|
// Catch runaway clipping rectangles.
|
||||||
|
V_ClearClipRect();
|
||||||
|
|
||||||
init_hook_call(&hook, 0, res_none);
|
init_hook_call(&hook, 0, res_none);
|
||||||
call_mapped(&hook, map);
|
call_mapped(&hook, map);
|
||||||
|
|
||||||
hud_running = false;
|
hud_running = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue