mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fix passive bloodcats
This commit is contained in:
+12
-7
@@ -516,13 +516,18 @@ INT32 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT32 sDesGrid, IN
|
|||||||
#ifdef DEBUGDECISIONS
|
#ifdef DEBUGDECISIONS
|
||||||
AIPopMessage("destination Grid # itself not valid, looking around it");
|
AIPopMessage("destination Grid # itself not valid, looking around it");
|
||||||
#endif
|
#endif
|
||||||
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
// Commented out this branch for now because bloodcats are constantly failing to find a legal destination in the previous call to legalNPCDestination
|
||||||
{
|
// Following the function calls deep enough ( GoAsFarAsPossibleTowards -> InternalGoAsFarAsPossibleTowards -> LegalNPCDestination -> NewOKDestination -> InternalOkayToAddStructureToWorld -> OkayToAddStructureToTile) shows that the last one fails when checking if we can add bloodcat's structure onto the tile our merc is
|
||||||
// we tried to get close, failed; abort!
|
// This then results them freezing and staying in place even if they can see our mercs
|
||||||
pSoldier->pathing.usPathIndex = pSoldier->pathing.usPathDataSize = 0;
|
// The reason I'm leaving the code here instead of simply removing it is because this and the check for adding structures to a tile are really old code,
|
||||||
return( NOWHERE );
|
// which has definitely worked fine at some point. As I'm right now unable to find the real reason for this breaking, I'm just circumventing the issue for now. -Asdow
|
||||||
}
|
//if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||||
else
|
//{
|
||||||
|
// // we tried to get close, failed; abort!
|
||||||
|
// pSoldier->pathing.usPathIndex = pSoldier->pathing.usPathDataSize = 0;
|
||||||
|
// return( NOWHERE );
|
||||||
|
//}
|
||||||
|
//else
|
||||||
{
|
{
|
||||||
// else look at the 8 nearest gridnos to sDesGrid for a valid destination
|
// else look at the 8 nearest gridnos to sDesGrid for a valid destination
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user