I was just flicking about some files in the [root]/raw/maps folder and I came across these lines of code:
Code:
// used to a check in last stand for players to become zombies level.is_zombie_level = true; level.player_becomes_zombie = ::zombify_player;
and (very long):
Code:
zombify_player()
{
self maps\_zombiemode_score::player_died_penalty();
if( !IsDefined( level.zombie_vars["zombify_player"] ) || !level.zombie_vars["zombify_player"] )
{
self thread spawnSpectator();
return;
}
self.ignoreme = true;
self.is_zombie = true;
self.zombification_time = getTime();
self.team = "axis";
self notify( "zombified" );
if( IsDefined( self.revivetrigger ) )
{
self.revivetrigger Delete();
}
self.revivetrigger = undefined;
self setMoveSpeedScale( 0.3 );
self reviveplayer();
self TakeAllWeapons();
self starttanning();
self GiveWeapon( "zombie_melee", 0 );
self SwitchToWeapon( "zombie_melee" );
self DisableWeaponCycling();
self DisableOffhandWeapons();
self VisionSetNaked( "zombie_turned", 1 );
maps\_utility::setClientSysState( "zombify", 1, self ); // Zombie grain goooo
self thread maps\_zombiemode_spawner::zombie_eye_glow();
// set up the ground ref ent
self thread injured_walk();
// allow for zombie attacks, but they lose points?
self thread playerzombie_player_damage();
self thread playerzombie_soundboard();
}
playerzombie_player_damage()
{
self endon( "death" );
self endon( "disconnect" );
self thread playerzombie_infinite_health(); // manually keep regular health up
self.zombiehealth = level.zombie_health;
// enable PVP damage on this guy
// self EnablePvPDamage();
while( 1 )
{
self waittill( "damage", amount, attacker, directionVec, point, type );
if( !IsDefined( attacker ) || !IsPlayer( attacker ) )
{
wait( 0.05 );
continue;
}
self.zombiehealth -= amount;
if( self.zombiehealth <= 0 )
{
// "down" the zombie
self thread playerzombie_downed_state();
self waittill( "playerzombie_downed_state_done" );
self.zombiehealth = level.zombie_health;
}
}
}
playerzombie_downed_state()
{
self endon( "death" );
self endon( "disconnect" );
downTime = 15;
startTime = GetTime();
endTime = startTime +( downTime * 1000 );
self thread playerzombie_downed_hud();
self.playerzombie_soundboard_disable = true;
self thread maps\_zombiemode_spawner::zombie_eye_glow_stop();
self DisableWeapons();
self AllowStand( false );
self AllowCrouch( false );
self AllowProne( true );
while( GetTime() < endTime )
{
wait( 0.05 );
}
self.playerzombie_soundboard_disable = false;
self thread maps\_zombiemode_spawner::zombie_eye_glow();
self EnableWeapons();
self AllowStand( true );
self AllowCrouch( false );
self AllowProne( false );
self notify( "playerzombie_downed_state_done" );
}
playerzombie_downed_hud()
{
self endon( "death" );
self endon( "disconnect" );
text = NewClientHudElem( self );
text.alignX = "center";
text.alignY = "middle";
text.horzAlign = "center";
text.vertAlign = "bottom";
text.foreground = true;
text.font = "default";
text.fontScale = 1.8;
text.alpha = 0;
text.color = ( 1.0, 1.0, 1.0 );
text SetText( &"ZOMBIE_PLAYERZOMBIE_DOWNED" );
text.y = -113;
if( IsSplitScreen() )
{
text.y = -137;
}
text FadeOverTime( 0.1 );
text.alpha = 1;
self waittill( "playerzombie_downed_state_done" );
text FadeOverTime( 0.1 );
text.alpha = 0;
}
playerzombie_infinite_health()
{
self endon( "death" );
self endon( "disconnect" );
bighealth = 100000;
while( 1 )
{
if( self.health < bighealth )
{
self.health = bighealth;
}
wait( 0.1 );
}
}
playerzombie_soundboard()
{
self endon( "death" );
self endon( "disconnect" );
self.playerzombie_soundboard_disable = false;
self.buttonpressed_use = false;
self.buttonpressed_attack = false;
self.buttonpressed_ads = false;
self.useSound_waitTime = 3 * 1000; // milliseconds
self.useSound_nextTime = GetTime();
useSound = "playerzombie_usebutton_sound";
self.attackSound_waitTime = 3 * 1000;
self.attackSound_nextTime = GetTime();
attackSound = "playerzombie_attackbutton_sound";
self.adsSound_waitTime = 3 * 1000;
self.adsSound_nextTime = GetTime();
adsSound = "playerzombie_adsbutton_sound";
self.inputSound_nextTime = GetTime(); // don't want to be able to do all sounds at once
while( 1 )
{
if( self.playerzombie_soundboard_disable )
{
wait( 0.05 );
continue;
}
if( self UseButtonPressed() )
{
if( self can_do_input( "use" ) )
{
self thread playerzombie_play_sound( useSound );
self thread playerzombie_waitfor_buttonrelease( "use" );
self.useSound_nextTime = GetTime() + self.useSound_waitTime;
}
}
else if( self AttackButtonPressed() )
{
if( self can_do_input( "attack" ) )
{
self thread playerzombie_play_sound( attackSound );
self thread playerzombie_waitfor_buttonrelease( "attack" );
self.attackSound_nextTime = GetTime() + self.attackSound_waitTime;
}
}
else if( self AdsButtonPressed() )
{
if( self can_do_input( "ads" ) )
{
self thread playerzombie_play_sound( adsSound );
self thread playerzombie_waitfor_buttonrelease( "ads" );
self.adsSound_nextTime = GetTime() + self.adsSound_waitTime;
}
}
wait( 0.05 );
}
}
Just came across these and thought WOW THATS not in the game. I know they didn't have much time on the project but can anyone fill me in?