mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
fix: The first three boxing fights could never be completed if no boxers were available (direct result of a change in r7263) because Darren's quote requires at least one boxer.
If the player killed all boxers during these fights the check would fail. A new externalized parameter "KINGPIN_RING_TILE" for Kingpins location at the ring was implemented. This is used to check if Kingpin is watching these first three fights. If so it will override the BoxersAvailable check. fix: AI could be gathering around an empty player vehicle. Disturbance check should from now on ignore that. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7737 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1135,7 +1135,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
break;
|
||||
|
||||
case FACT_KINGPIN_NOT_IN_OFFICE:
|
||||
gubFact[usFact] = !( gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_D && NPCInRoomRange( KINGPIN, 30, 39 ) );
|
||||
gubFact[usFact] = !( gWorldSectorX == gModSettings.ubKingpinHouseSectorX && gWorldSectorY == gModSettings.ubKingpinHouseSectorY && NPCInRoomRange( KINGPIN, gModSettings.usKingpinRoomRangeStart, gModSettings.usKingpinRoomRangeEnd ) );
|
||||
// 30 to 39
|
||||
break;
|
||||
|
||||
@@ -1145,7 +1145,14 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
|
||||
case FACT_NO_CLUB_FIGHTING_ALLOWED:
|
||||
// anv: added !BoxersAvailable, otherwise van Haussen would offer fight even when all boxers are dead
|
||||
gubFact[usFact] = ( gubQuest[ QUEST_KINGPIN_MONEY ] == QUESTINPROGRESS || gfBoxersResting || !BoxersAvailable() );// plus other conditions
|
||||
// silversurfer: additional fix - the check below failed when we killed all boxers because BoxersAvailable() returns 0 in this case.
|
||||
// Added additional check for Kingpins location so that the three initial fights can be completed. As soon as Kingpin is gone the original check will apply again.
|
||||
SOLDIERTYPE * pKingpin;
|
||||
pKingpin = FindSoldierByProfileID( KINGPIN, FALSE );
|
||||
if ( pKingpin )
|
||||
gubFact[usFact] = ( gubQuest[ QUEST_KINGPIN_MONEY ] == QUESTINPROGRESS || gfBoxersResting || ( !BoxersAvailable() && PythSpacesAway(pKingpin->sGridNo, gModSettings.iKingpinRingTile) > 2 ) );// plus other conditions
|
||||
else
|
||||
gubFact[usFact] = TRUE;
|
||||
break;
|
||||
|
||||
case FACT_MADDOG_IS_SPEAKER:
|
||||
|
||||
Reference in New Issue
Block a user