mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
If a value of 1 is returned from EVENT_DISPLAYROOMS, don't draw them.
This includes mirrors, rooms and masks. Any value other than 0 or 1 that is returned is considered an error (reserved for future use). git-svn-id: https://svn.eduke32.com/eduke32@2889 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0cac20c2d6
commit
d1e9116c23
1 changed files with 43 additions and 35 deletions
|
@ -3420,7 +3420,7 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, int32_t a, int32_t horiz, i
|
|||
|
||||
void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
||||
{
|
||||
int32_t i;
|
||||
int32_t i, dont_draw;
|
||||
DukePlayer_t *const p = g_player[snum].ps;
|
||||
|
||||
int32_t tmpyx=yxaspect, tmpvr=viewingrange;
|
||||
|
@ -3666,13 +3666,20 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
|||
break;
|
||||
}
|
||||
|
||||
dont_draw = 0;
|
||||
// NOTE: might be rendering off-screen here, so CON commands that draw stuff
|
||||
// like showview must cope with that situation or bail out!
|
||||
if (apScriptGameEvent[EVENT_DISPLAYROOMS])
|
||||
VM_OnEvent(EVENT_DISPLAYROOMS, g_player[screenpeek].ps->i, screenpeek, -1, 0);
|
||||
dont_draw = VM_OnEvent(EVENT_DISPLAYROOMS, g_player[screenpeek].ps->i, screenpeek, -1, 0);
|
||||
|
||||
ud.camerahoriz = clamp(ud.camerahoriz, HORIZ_MIN, HORIZ_MAX);
|
||||
|
||||
if (dont_draw != 1) // event return values other than 0 and 1 are reserved
|
||||
{
|
||||
if (dont_draw != 0)
|
||||
OSD_Printf(OSD_ERROR "ERROR: EVENT_DISPLAYROOMS return value must be 0 or 1, "
|
||||
"other values are reserved.\n");
|
||||
|
||||
G_HandleMirror(ud.camera.x, ud.camera.y, ud.camera.z, ud.cameraang, ud.camerahoriz, smoothratio);
|
||||
|
||||
G_SE40(smoothratio);
|
||||
|
@ -3723,6 +3730,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
|||
|
||||
drawing_ror = 0;
|
||||
drawmasks();
|
||||
}
|
||||
|
||||
if (g_screenCapture)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue