Try to start 14_OceanLab_Lab on a dedicated server, join the game, grab the fire exinguisher, use it and voila you are burning!
Solution:
The FireExinguisher spawns HalonGas-projectiles. And somehow PlayerPawn.TakeDamage() is called on the client, but with DamageType = 'Flamed'. Then the client calls CatchFire(), but for whatever foolish reason this function is replicated to the server. So you are on fire. MEGA BARF!
Just another example how fucked up DeusEx code is.
The Story why you can ignite yourself with a FireExinguisher
Re: The Story why you can ignite yourself with a FireExingui
I found this anecdote highly amusing.
Jonas Wæver
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Re: The Story why you can ignite yourself with a FireExingui
Huh, why is Flamed being used for the damage type? There's got to be some reason for that.
Re: The Story why you can ignite yourself with a FireExingui
FireExtinguisher.uc
ProjectileGenerator.uc
ProjectileClass is NOT replication. So the client spawns Fireballs.
Code: Select all
gen = Spawn(class'ProjectileGenerator', None,, loc, rot);
if (gen != None)
{
gen.ProjectileClass = class'HalonGas';
// [...]
}
Code: Select all
defaultproperties
{
// [...]
ProjectileClass=Class'DeusEx.Fireball'
// [...]
}
Re: The Story why you can ignite yourself with a FireExingui
I have to say, being able to set yourself on fire with a fire extinguisher is a pretty great bug.
What would be necessary to fix it, out of curiosity? I know very little about replication.
What would be necessary to fix it, out of curiosity? I know very little about replication.
Re: The Story why you can ignite yourself with a FireExingui
HXHuman.uc:
That's what i did. Can't remember if this was all to fix it. CatchFireNonRep() was just a plain copy of the old CatchFire(). Maybe there are some coop related changes in the code i postet.
Code: Select all
// ----------------------------------------------------------------------
// CatchFireNonRep()
// ----------------------------------------------------------------------
function CatchFire( Pawn burner )
{
// replication is fucked up, so get rid of it
}
// ----------------------------------------------------------------------
// CatchFireNonRep()
// ----------------------------------------------------------------------
function CatchFireNonRep( Pawn burner )
{
local Fire f;
local int i;
local vector loc;
//Log( Self $ ".CatchFire( " $ burner $ " ) called." );
myBurner = burner;
burnTimer = 0;
if (bOnFire || Region.Zone.bWaterZone)
return;
bOnFire = True;
burnTimer = 0;
for (i=0; i<8; i++)
{
loc.X = 0.5*CollisionRadius * (1.0-2.0*FRand());
loc.Y = 0.5*CollisionRadius * (1.0-2.0*FRand());
loc.Z = 0.6*CollisionHeight * (1.0-2.0*FRand());
loc += Location;
// DEUS_EX AMSD reduce the number of smoke particles in multiplayer
// by creating smokeless fire (better for server propagation).
if ((Level.NetMode == NM_Standalone) || (i <= 0))
f = Spawn(class'Fire', Self,, loc);
else
f = Spawn(class'SmokelessFire', Self,, loc);
if (f != None)
{
f.DrawScale = 0.5*FRand() + 1.0;
//DEUS_EX AMSD Reduce the penalty in multiplayer
//if (Level.NetMode != NM_Standalone)
//f.DrawScale = f.DrawScale * 0.5;
// turn off the sound and lights for all but the first one
if (i > 0)
{
f.AmbientSound = None;
f.LightType = LT_None;
}
// turn on/off extra fire and smoke
// MP already only generates a little.
if ((FRand() < 0.5) && (Level.NetMode == NM_Standalone))
f.smokeGen.Destroy();
if ((FRand() < 0.5) && (Level.NetMode == NM_Standalone))
f.AddFire();
}
}
// set the burn timer
SetTimer(1.0, True);
}
// ----------------------------------------------------------------------
// TakeDamage()
// ----------------------------------------------------------------------
function TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType)
{
// [...]
if ((DamageType == 'Flamed') && !bOnFire)
{
// Notify player if they're getting burned for the first time
if ( Level.NetMode != NM_Standalone )
ServerConditionalNotifyMsg( MPMSG_FirstBurn );
if ( Role == ROLE_Authority ) // <-------------------------------
CatchFireNonRep( instigatedBy ); // <-------------------------------
}
myProjKiller = None;
}
Re: The Story why you can ignite yourself with a FireExingui
Wait, I thought the problem was related to replication with the projectile generator itself, though?
Also, does catching on fire when you're supposed to still work with that non-replicating version of the function?
Also, does catching on fire when you're supposed to still work with that non-replicating version of the function?
Re: The Story why you can ignite yourself with a FireExingui
The real problem was that the Client could call this SetOnFire() function on the Server. But the Server should have the authority about gameplay related stuff. So it's still called on the Server. Okay check for server and renaming the function is probably not necessary. On of the fixes should be enough.