# HG changeset patch # User Grumpy7 # Date 1382425454 25200 # Node ID 18dacb49efe9850f8021fce3f3957e521cca8ee6 # Parent cb1cbb969fce160b8b2961b4c0f03b27358acd9a Actor::AI_Flee fixing crash diff -r cb1cbb969fce -r 18dacb49efe9 Actor.cpp --- a/Actor.cpp Mon Oct 21 23:20:29 2013 -0700 +++ b/Actor.cpp Tue Oct 22 00:04:14 2013 -0700 @@ -2193,8 +2193,8 @@ Actor *v5; // ebx@1 int v7; // ecx@2 unsigned __int16 v9; // ax@15 - AIDirection* v10 = nullptr; // [sp+8h] [bp-7Ch]@4 - AIDirection* a3 = nullptr; // [sp+24h] [bp-60h]@3 + AIDirection v10; // [sp+8h] [bp-7Ch]@4 + AIDirection a3; // [sp+24h] [bp-60h]@3 AIDirection* v13; // [sp+5Ch] [bp-28h]@4 v5 = &pActors[uActorID]; @@ -2203,9 +2203,9 @@ v7 = PID(OBJECT_Actor,uActorID); if ( !a4 ) { - a4 = Actor::GetDirectionInfo(v7, sTargetPid, a3, v5->pMonsterInfo.uFlying); + a4 = Actor::GetDirectionInfo(v7, sTargetPid, &a3, v5->pMonsterInfo.uFlying); } - v13 = Actor::GetDirectionInfo(v7, 4u, v10, 0); + v13 = Actor::GetDirectionInfo(v7, 4u, &v10, 0); if ( MonsterStats::BelongsToSupertype(v5->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) || PID_TYPE(sTargetPid) == OBJECT_Actor && v13->uDistance < 307.2 ) {