From af511ed275ebe8f50ce00a706fcef37ab5346794 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Fri, 25 May 2012 05:13:41 +0000 Subject: [PATCH] Setting RETURN in EVENT_DISPLAYCROSSHAIR will now change the crosshair's picnum while allowing the game to position it, etc. As usual, setting RETURN to -1 disables hardcoded drawing of the crosshair completely. git-svn-id: https://svn.eduke32.com/eduke32@2687 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index c5afcb93b..91385a105 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2924,7 +2924,8 @@ void G_DisplayRest(int32_t smoothratio) if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && ud.crosshair && ud.camerasprite == -1) { - if (VM_OnEvent(EVENT_DISPLAYCROSSHAIR, g_player[screenpeek].ps->i, screenpeek, -1, 0) == 0) + a = VM_OnEvent(EVENT_DISPLAYCROSSHAIR, g_player[screenpeek].ps->i, screenpeek, -1, CROSSHAIR); + if (a >= 0) { int32_t x, y; #ifdef GEKKO @@ -2942,7 +2943,7 @@ void G_DisplayRest(int32_t smoothratio) } rotatesprite_win((x-(g_player[myconnectindex].ps->look_ang>>1))<<16,y<<16,scale(65536,ud.crosshairscale,100), - 0,CROSSHAIR,0,CROSSHAIR_PAL,2+1); + 0,a,0,CROSSHAIR_PAL,2+1); } } #if 0