After porting most assets from UT99 to U1, I noticed that most campaigns work fine on the original Unreal, one of my favorites being Project Zephon, I knew I had to replay it again...It worked great and I made my way to the penultimate level where you fight those "Deus Ex Military Bots"...only to encounter a fatal crash (copy/pasted from Unreal Log):
Code: Select all
Critical: appError called:
Critical: Failed to find function PreventDeath in Mutator Save2.Mutator4
Critical: Windows GetLastError: An operation was attempted on something that is not a socket. (10038)
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UALAudioSubsystem::ShutdownAfterError
Log: DirectDraw End Mode
Exit: UOpenGLRenderDevice::ShutdownAfterError
Log: Resetting gamma
Critical: UObject::ProcessEvent
Critical: (RazorBlade Save2.RazorBlade35, Function Engine.Projectile.Touch)
Critical: TouchTo
Critical: AActor::BeginTouch
Critical: ULevel::MoveActor
Critical: AActor::physProjectile
Critical: AActor::performPhysics
Critical: AActor::Tick
Critical: TickAllActors
Critical: ULevel::Tick
Critical: (NetMode=0)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: UpdateWorld
Critical: MainLoop
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 08/13/17 16:54:03
Below is the code of the base pawn which is used mostly in Coop, with MilitaryBot2 assigned to Solo play most of the time and having the same code with the only difference being its stats in-game such as HP number and Aggressiveness.
Code: Select all
//=============================================================================
// MilitaryBot.
//=============================================================================
class MilitaryBot extends ScriptedPawn;
#exec MESH IMPORT MESH=MilitaryBot ANIVFILE=MODELS\MilitaryBot_a.3d DATAFILE=MODELS\MilitaryBot_d.3d
#exec MESH ORIGIN MESH=MilitaryBot X=0.00 Y=0.00 Z=128.00 YAW=-64.00 ROLL=128.00 PITCH=128.00
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=All STARTFRAME=0 NUMFRAMES=35
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Walk STARTFRAME=1 NUMFRAMES=20 RATE=10.00
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Run STARTFRAME=1 NUMFRAMES=20 RATE=10.00
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Shoot STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=BreatheLight STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=DeathFront STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=DeathBack STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Idle STARTFRAME=21 NUMFRAMES=14 RATE=3.00
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Disabled1 STARTFRAME=4 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Disabled2 STARTFRAME=14 NUMFRAMES=1
#exec TEXTURE IMPORT NAME=MilitaryBotTex1 FILE=MilitaryBotTex1.PCX GROUP=Skins
#exec MESHMAP SETTEXTURE MESHMAP=MilitaryBot NUM=0 TEXTURE=MilitaryBotTex1
#exec MESHMAP SCALE MESHMAP=MilitaryBot X=0.2 Y=0.2 Z=0.2
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Walk TIME=0.05 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Walk TIME=0.50 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Run TIME=0.05 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Run TIME=0.50 FUNCTION=PlayFootStep
var() byte WhipDamage; // Basic damage done by pistol-whip.
var bool bBerserk;
var bool bLongBerserk;
var() bool bTurret; // Doesn't move
// Sounds
var(Sounds) sound Footstep;
var(Sounds) sound Footstep2;
var(Sounds) sound PistolWhip;
var(Sounds) sound GutShot;
var(Sounds) sound PistolHit;
var(Sounds) sound Die2;
function PostBeginPlay()
{
Super.PostBeginPlay();
if (Skill > 1)
bLeadTarget = true;
if ( Skill == 0 )
ProjectileSpeed *= 0.85;
else if ( Skill > 2 )
ProjectileSpeed *= 1.1;
}
function eAttitude AttitudeToCreature(Pawn Other)
{
if ( Other.IsA('MilitaryBot') )
return ATTITUDE_Friendly;
else if ( Other.IsA('ScriptedPawn') )
return ATTITUDE_Hate;
else
return ATTITUDE_Ignore;
}
function GoBerserk()
{
bLongBerserk = false;
if ( (bBerserk || ((Health < 0.75 * Default.Health) && (FRand() < 0.65)))
&& (VSize(Location - Enemy.Location) < 500) )
bBerserk = true;
else
bBerserk = false;
if ( bBerserk )
{
AccelRate = 4 * AccelRate;
GroundSpeed = 1 * Default.GroundSpeed;
}
}
simulated function skinnedFrag(class FragType, texture FragSkin, float DSize, int NumFrags)
{
local int i;
local actor A, Toucher;
local Fragment s;
if (Event!='')
foreach AllActors( class 'Actor', A, Event )
A.Trigger( Toucher, pawn(Toucher) );
if ( Region.Zone.bDestructive )
{
Destroy();
return;
}
for (i=0 ; i