Skip to content

Commit

Permalink
Promod LIVE V2.12 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingramz authored and Trivve committed Apr 27, 2011
1 parent bcef57d commit 7f17d08
Show file tree
Hide file tree
Showing 26 changed files with 361 additions and 332 deletions.
2 changes: 1 addition & 1 deletion compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@echo off

SET mod_name=promodlive211
SET mod_name=promodlive212
SET work_directory=%~dp0
cd %work_directory%

Expand Down
2 changes: 1 addition & 1 deletion compile_fastfile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ copy mod.csv ..\..\zone_source /Y
cd ..\..\bin
linker_pc.exe -language english -compress -cleanup mod -verbose

cd ..\mods\promodlive211
cd ..\mods\promodlive212
copy ..\..\zone\english\mod.ff

pause
121 changes: 52 additions & 69 deletions maps/mp/_destructible.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,20 @@ setup_destructibles()
if ( isdefined( level.destructible_type[ self.destuctableInfo ].parts[ i ][ 0 ].v[ "health" ] ) )
self.destructible_parts[ i ].v[ "health" ] = level.destructible_type[ self.destuctableInfo ].parts[ i ][ 0 ].v[ "health" ];

if ( !i )
continue;

modelName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ 0 ].v[ "modelName" ];
tagName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ 0 ].v[ "tagName" ];

stateIndex = 1;
while ( isDefined( level.destructible_type[ self.destuctableInfo ].parts[ i ][ stateIndex ] ) )
if ( i )
{
stateTagName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ stateIndex ].v[ "tagName" ];
stateModelName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ stateIndex ].v[ "modelName" ];
if ( isDefined( stateTagName ) && stateTagName != tagName )
self hideapart( stateTagName );
stateIndex++;
modelName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ 0 ].v[ "modelName" ];
tagName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ 0 ].v[ "tagName" ];

stateIndex = 1;
while ( isDefined( level.destructible_type[ self.destuctableInfo ].parts[ i ][ stateIndex ] ) )
{
stateTagName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ stateIndex ].v[ "tagName" ];
stateModelName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ stateIndex ].v[ "modelName" ];
if ( isDefined( stateTagName ) && stateTagName != tagName )
self hidepart( stateTagName );
stateIndex++;
}
}
}
}
Expand Down Expand Up @@ -387,19 +387,19 @@ destructible_update_part( damage, modelName, tagName, point, direction_vec, atta

if ( isdefined( level.destructible_type[ self.destuctableInfo ].parts[ partIndex ][ stateIndex ] ) )
{
if ( !partIndex )
if ( partIndex )
{
newModel = level.destructible_type[ self.destuctableInfo ].parts[ partIndex ][ stateIndex ].v[ "modelName" ];
self setModel( newModel );
}
else
{
self hideapart( tagName );
self hidepart( tagName );
modelName = level.destructible_type[ self.destuctableInfo ].parts[ partIndex ][ stateIndex ].v[ "modelName" ];
tagName = level.destructible_type[ self.destuctableInfo ].parts[ partIndex ][ stateIndex ].v[ "tagName" ];

if ( isdefined( modelName ) && isdefined( tagName ) )
self showapart( tagName );
self showpart( tagName );
}
else
{
newModel = level.destructible_type[ self.destuctableInfo ].parts[ partIndex ][ stateIndex ].v[ "modelName" ];
self setModel( newModel );
}
}

Expand Down Expand Up @@ -489,6 +489,7 @@ destructible_update_part( damage, modelName, tagName, point, direction_vec, atta
return;

updateHealthValue = true;
wait 0.05;
}
}

Expand All @@ -512,15 +513,15 @@ destructible_splash_damage( damage, point, direction_vec, attacker, damageType )
{
modelName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ j ].v[ "modelName" ];

if ( !i )
if ( i )
{
d = distance( point, self.origin );
tagName = undefined;
tagName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ j ].v[ "tagName" ];
d = distance( point, self getTagOrigin( tagName ) );
}
else
{
tagName = level.destructible_type[ self.destuctableInfo ].parts[ i ][ j ].v[ "tagName" ];
d = distance( point, self getTagOrigin( tagName ) );
tagName = undefined;
d = distance( point, self.origin );
}

if ( ( !isdefined( closestPartDist ) ) || ( d < closestPartDist ) )
Expand Down Expand Up @@ -554,22 +555,14 @@ destructible_splash_damage( damage, point, direction_vec, attacker, damageType )
isValidSoundCause( soundCauseVar, partIndex, stateIndex, soundIndex, damageType )
{
soundCause = level.destructible_type[ self.destuctableInfo ].parts[ partIndex ][ stateIndex ].v[ soundCauseVar ][ soundIndex ];
if ( !isdefined( soundCause ) || soundCause == damageType )
return true;

return false;

return !isdefined( soundCause ) || soundCause == damageType;
}

isValidDamageCause( partIndex, stateIndex, damageType )
{
validType = level.destructible_type[ self.destuctableInfo ].parts[ partIndex ][ stateIndex ].v[ "validDamageCause" ];
if ( !isdefined( damageType ) || !isdefined( validType ) )
return true;

if ( ( validType == "no_melee" ) && damageType == "melee" || damageType == "impact" )
return false;

return true;
return !isdefined( damageType ) || !isdefined( validType ) || (validType != "no_melee" || damageType != "melee") && damageType != "impact";
}

getDamageType( type )
Expand Down Expand Up @@ -628,35 +621,35 @@ health_drain( amount, interval, partIndex, modelName, tagName )

explode( partIndex, force_min, force_max, range, mindamage, maxdamage )
{
if ( isdefined( self.exploded ) )
return;
if ( !isdefined( self.exploded ) )
{
self.exploded = true;

self.exploded = true;
if(self.classname == "script_vehicle")
self notify ("death");

if(self.classname == "script_vehicle")
self notify ("death");
wait 0.05;

wait 0.05;
tagName = level.destructible_type[ self.destuctableInfo ].parts[ partIndex ][ self.destructible_parts[ partIndex ].v[ "currentState" ] ].v[ "tagName" ];
if ( isdefined( tagName ) )
explosionOrigin = self getTagOrigin( tagName );
else
explosionOrigin = self.origin;

tagName = level.destructible_type[ self.destuctableInfo ].parts[ partIndex ][ self.destructible_parts[ partIndex ].v[ "currentState" ] ].v[ "tagName" ];
if ( isdefined( tagName ) )
explosionOrigin = self getTagOrigin( tagName );
else
explosionOrigin = self.origin;
self notify( "damage", maxdamage, self, ( 0, 0, 0 ), explosionOrigin, "MOD_EXPLOSIVE", "", "" );

self notify( "damage", maxdamage, self, ( 0, 0, 0 ), explosionOrigin, "MOD_EXPLOSIVE", "", "" );

waittillframeend;
waittillframeend;

self notify( "stop_taking_damage" );
wait 0.05;
self notify( "stop_taking_damage" );
wait 0.05;

if ( !isDefined( self.damageOwner ) )
self radiusDamage( explosionOrigin + ( 0, 0, 80 ), range, maxdamage, mindamage );
else
{
self radiusDamage( explosionOrigin + ( 0, 0, 80 ), range, maxdamage, mindamage, self.damageOwner );
self.damageOwner notify ( "destroyed_car" );
if ( isDefined( self.damageOwner ) )
{
self radiusDamage( explosionOrigin + ( 0, 0, 80 ), range, maxdamage, mindamage, self.damageOwner );
self.damageOwner notify ( "destroyed_car" );
}
else
self radiusDamage( explosionOrigin + ( 0, 0, 80 ), range, maxdamage, mindamage );
}
}

Expand Down Expand Up @@ -697,14 +690,4 @@ string( num )
deleteEnt( ent )
{
ent delete();
}

hideapart( tagName )
{
self hidepart( tagName );
}

showapart( tagName )
{
self showpart( tagName );
}
Loading

0 comments on commit 7f17d08

Please sign in to comment.