From 09ea0d8ec2ac42706d55a2e6043befadbdf1d698 Mon Sep 17 00:00:00 2001 From: silversurfer Date: Thu, 26 Sep 2013 18:23:29 +0000 Subject: [PATCH] Changed code for sex in brothel to use the externalized grid numbers. This change only helps if you use the fixed LUA script in GameDir 1792. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6445 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/LuaInitNPCs.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Strategic/LuaInitNPCs.cpp b/Strategic/LuaInitNPCs.cpp index ac73fbda..dde0faad 100644 --- a/Strategic/LuaInitNPCs.cpp +++ b/Strategic/LuaInitNPCs.cpp @@ -7089,23 +7089,23 @@ static int l_ACTION_ITEM_SEX (lua_State *L) // stop the merc... MercPtrs[ ubID ]->EVENT_StopMerc( MercPtrs[ ubID ]->sGridNo, MercPtrs[ ubID ]->ubDirection ); - switch( sGridNo ) + if ( sGridNo == gModSettings.iCarlaDoorGridNo +1 ) + { + sDoorSpot = gModSettings.iCarlaDoorGridNo; + sTeleportSpot = gModSettings.iCarlaDoorGridNo; + } + else if ( sGridNo == gModSettings.iCindyDoorGridNo +1 ) + { + sDoorSpot = gModSettings.iCindyDoorGridNo; + sTeleportSpot = gModSettings.iCindyDoorGridNo; + } + else if ( sGridNo == gModSettings.iBambiDoorGridNo ) + { + sDoorSpot = gModSettings.iBambiDoorGridNo; + sTeleportSpot = gModSettings.iBambiDoorGridNo +1; + } + else { - case 13414: - sDoorSpot = 13413; - sTeleportSpot = 13413; - break; - case 11174: - sDoorSpot = 11173; - sTeleportSpot = 11173; - break; - case 12290: - sDoorSpot = 12290; - sTeleportSpot = 12291; - break; - - default: - sDoorSpot = NOWHERE; sTeleportSpot = NOWHERE; }