mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1017 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2040,6 +2040,10 @@ INT8 ExecuteAction(SOLDIERTYPE *pSoldier)
|
||||
|
||||
DebugAI( String( "%d does %s (a.d. %d) at time %ld", pSoldier->ubID, gzActionStr[pSoldier->bAction], pSoldier->usActionData, GetJA2Clock() ) );
|
||||
|
||||
// 0verhaul: The decideaction stage does so many path plots and overrides that
|
||||
// relying on a stored path from there is a bad idea.
|
||||
pSoldier->usPathDataSize = pSoldier->usPathIndex = pSoldier->bPathStored = 0;
|
||||
|
||||
switch (pSoldier->bAction)
|
||||
{
|
||||
case AI_ACTION_NONE: // maintain current position & facing
|
||||
|
||||
@@ -2805,6 +2805,10 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier, UINT8 ubUnconsciousOK)
|
||||
action = AI_ACTION_FLANK_RIGHT ;
|
||||
break;
|
||||
}
|
||||
|
||||
if (action == AI_ACTION_SEEK_OPPONENT) {
|
||||
return action;
|
||||
}
|
||||
}
|
||||
else
|
||||
return AI_ACTION_SEEK_OPPONENT ;
|
||||
@@ -4602,9 +4606,13 @@ INT8 DecideActionBlack(SOLDIERTYPE *pSoldier)
|
||||
if ( sClosestOpponent != NOWHERE )
|
||||
{
|
||||
// temporarily make boxer have orders of CLOSEPATROL rather than STATIONARY
|
||||
// And make him patrol the ring, not his usual place
|
||||
// so he has a good roaming range
|
||||
USHORT tgrd = pSoldier->usPatrolGrid[0];
|
||||
pSoldier->usPatrolGrid[0] = pSoldier->sGridNo;
|
||||
pSoldier->bOrders = CLOSEPATROL;
|
||||
pSoldier->usActionData = GoAsFarAsPossibleTowards( pSoldier, sClosestOpponent, AI_ACTION_GET_CLOSER );
|
||||
pSoldier->usPatrolGrid[0] = tgrd;
|
||||
pSoldier->bOrders = STATIONARY;
|
||||
if ( pSoldier->usActionData != NOWHERE )
|
||||
{
|
||||
|
||||
@@ -2477,6 +2477,8 @@ INT16 FindFlankingSpot(SOLDIERTYPE *pSoldier, INT16 sPos, INT8 bAction )
|
||||
case AI_ACTION_WITHDRAW:
|
||||
sDesiredDir = sDir + 4;
|
||||
break;
|
||||
default:
|
||||
sDesiredDir = sDir;
|
||||
}
|
||||
|
||||
if ( sDesiredDir < 0 )
|
||||
|
||||
@@ -451,6 +451,10 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
INT8 bAPsLeft, fPathFlags;
|
||||
UINT8 ubRoomRequired = 0, ubTempRoom;
|
||||
|
||||
// 0verhaul: Make sure to clear the stored path since this always calculates a new one.
|
||||
// This is needed if the path cannot be found.
|
||||
pSoldier->bPathStored = FALSE;
|
||||
|
||||
if ( bReserveAPs == -1 )
|
||||
{
|
||||
// default reserve points
|
||||
@@ -539,6 +543,7 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||
{
|
||||
// we tried to get close, failed; abort!
|
||||
pSoldier->usPathIndex = pSoldier->usPathDataSize = 0;
|
||||
return( NOWHERE );
|
||||
}
|
||||
else
|
||||
@@ -593,6 +598,7 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
AINumMessage("Couldn't find OK destination around grid #",sDesGrid);
|
||||
#endif
|
||||
|
||||
pSoldier->usPathIndex = pSoldier->usPathDataSize = 0;
|
||||
return(NOWHERE);
|
||||
}
|
||||
|
||||
@@ -739,6 +745,7 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
AIPopMessage(tempstr);
|
||||
#endif
|
||||
|
||||
pSoldier->usPathIndex = pSoldier->usPathDataSize = 0;
|
||||
return(NOWHERE); // then go nowhere
|
||||
}
|
||||
else
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="TacticalAI_2005Express"
|
||||
ProjectGUID="{27A49DAF-3F5A-4FF2-B943-9559F0B63032}"
|
||||
RootNamespace="TacticalAI_2005Express"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_2005Express.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_2005Express.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\AI All.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ai.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\AIInternals.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\AIList.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\NPC.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\QuestDebug.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\AIList.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\AIMain.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\AIUtils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Attacks.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CreatureDecideAction.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DecideAction.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\FindLocations.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Knowledge.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Medical.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Movement.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\NPC.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PanicButtons.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\QuestDebug.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Realtime.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
Reference in New Issue
Block a user