mirror of
https://github.com/XLabsProject/iw4x-rawfiles.git
synced 2023-08-02 15:02:11 +02:00
Improve oilrig a bit
This commit is contained in:
parent
619b2eb4d7
commit
bbdd339304
@ -6,10 +6,13 @@
|
|||||||
/dev/sr0
|
/dev/sr0
|
||||||
/dev/tty0
|
/dev/tty0
|
||||||
/dev/urandom
|
/dev/urandom
|
||||||
RektInator
|
Diamante
|
||||||
Doctor
|
Doctor
|
||||||
Dss0
|
Dss0
|
||||||
Jimbo
|
Jimbo
|
||||||
|
Laupetin
|
||||||
|
Louvenarde
|
||||||
lsb_release -a
|
lsb_release -a
|
||||||
Lunarion
|
Lunarion
|
||||||
|
RektInator
|
||||||
Snake
|
Snake
|
@ -1,6 +1,5 @@
|
|||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
#include maps\mp\gametypes\_hud_util;
|
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
@ -9,100 +8,27 @@ main()
|
|||||||
game[ "attackers" ] = "allies";
|
game[ "attackers" ] = "allies";
|
||||||
game[ "defenders" ] = "axis";
|
game[ "defenders" ] = "axis";
|
||||||
|
|
||||||
|
maps\mp\_compass::setupMiniMap( "compass_map_oilrig_lvl_1" );
|
||||||
|
maps\mp\_compass::setupMiniMap( "compass_map_oilrig_lvl_2" );
|
||||||
maps\mp\_compass::setupMiniMap( "compass_map_oilrig_lvl_3" );
|
maps\mp\_compass::setupMiniMap( "compass_map_oilrig_lvl_3" );
|
||||||
setdvar( "compassmaxrange", "4000" );
|
|
||||||
|
|
||||||
array_thread( getentarray( "breach_solid", "targetname" ), ::selfDelete );
|
setDvar( "compassMaxRange", 4000.0 );
|
||||||
|
|
||||||
array_thread( getentarray( "compassTriggers", "targetname" ), ::compass_triggers_think );
|
|
||||||
|
|
||||||
CreateRamps( ( 1676, 1330, -70 ), ( 2489, 1844, 900 ) );
|
|
||||||
CreateRamps( ( -965, 256, -200 ), ( -854, -77, 54 ) );
|
|
||||||
thread customKilltrigger();
|
|
||||||
thread level_think();
|
thread level_think();
|
||||||
thread level_think2();
|
|
||||||
}
|
|
||||||
|
|
||||||
selfDelete()
|
thread custom_kill_trigger();
|
||||||
{
|
|
||||||
self delete ();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Kills the player if he goes under them map
|
thread killTrigger( ( 1020, 175, -80 ), 110, 250 );
|
||||||
customKilltrigger()
|
|
||||||
{
|
|
||||||
while ( true )
|
|
||||||
{
|
|
||||||
wait 0.1;
|
|
||||||
|
|
||||||
foreach ( player in level.players )
|
|
||||||
{
|
|
||||||
if ( !isDefined( player ) || !isPlayer( player ) )
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( player.origin[2] < -350.0 )
|
|
||||||
{
|
|
||||||
player suicide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
compass_triggers_think()
|
|
||||||
{
|
|
||||||
assertex( isDefined( self.script_noteworthy ), "compassTrigger at " + self.origin + " needs to have a script_noteworthy with the name of the minimap to use" );
|
|
||||||
|
|
||||||
while ( true )
|
|
||||||
{
|
|
||||||
wait( 1 );
|
|
||||||
self waittill( "trigger" );
|
|
||||||
maps\mp\_compass::setupMiniMap( self.script_noteworthy );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateRamps( top, bottom )
|
|
||||||
{
|
|
||||||
D = Distance( top, bottom );
|
|
||||||
blocks = ceil( D / 30 );
|
|
||||||
CX = top[0] - bottom[0];
|
|
||||||
CY = top[1] - bottom[1];
|
|
||||||
CZ = top[2] - bottom[2];
|
|
||||||
XA = CX / blocks;
|
|
||||||
YA = CY / blocks;
|
|
||||||
ZA = CZ / blocks;
|
|
||||||
CXY = Distance( ( top[0], top[1], 0 ), ( bottom[0], bottom[1], 0 ) );
|
|
||||||
Temp = VectorToAngles( top - bottom );
|
|
||||||
BA = ( Temp[2], Temp[1] + 90, Temp[0] );
|
|
||||||
|
|
||||||
for ( b = 0; b < blocks; b++ )
|
|
||||||
{
|
|
||||||
block = spawn( "script_model", ( bottom + ( ( XA, YA, ZA ) * b ) ) );
|
|
||||||
//block setModel("com_plasticcase_friendly");
|
|
||||||
block.angles = BA;
|
|
||||||
block Solid();
|
|
||||||
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
|
|
||||||
wait 0.01;
|
|
||||||
}
|
|
||||||
|
|
||||||
block = spawn( "script_model", ( bottom + ( ( XA, YA, ZA ) * blocks ) - ( 0, 0, 5 ) ) );
|
|
||||||
//block setModel("com_plasticcase_friendly");
|
|
||||||
block.angles = ( BA[0], BA[1], 0 );
|
|
||||||
block Solid();
|
|
||||||
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
|
|
||||||
wait 0.01;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
level_think()
|
level_think()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
/*
|
|
||||||
-----------------------
|
-----------------------
|
||||||
MOVING DERRICK DRILL THING
|
MOVING DERRICK DRILL THING
|
||||||
-------------------------
|
-------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
eDerrick_thing = getent( "derrick_thing", "targetname" );
|
eDerrick_thing = getent( "derrick_thing", "targetname" );
|
||||||
eDerrick_thing.origin = eDerrick_thing.origin + ( 0, 0, -2816 );
|
eDerrick_thing.origin = eDerrick_thing.origin + ( 0, 0, -2816 );
|
||||||
assert( isDefined( eDerrick_thing ) );
|
assert( isDefined( eDerrick_thing ) );
|
||||||
@ -117,29 +43,23 @@ level_think()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
level_think2()
|
custom_kill_trigger()
|
||||||
{
|
{
|
||||||
model1 = getent( "fx_spotlight_beam", "targetname" );
|
|
||||||
model2 = getent( "com_blackhawk_spotlight_on_mg_setup", "targetname" );
|
|
||||||
assert( isDefined( model1 ) );
|
|
||||||
assert( isDefined( model2 ) );
|
|
||||||
|
|
||||||
time = 10;
|
|
||||||
|
|
||||||
while ( true )
|
while ( true )
|
||||||
{
|
{
|
||||||
model1 rotateto( model1.angles + ( 0, 45, 0 ), time );
|
wait 0.1;
|
||||||
model2 rotateto( model2.angles + ( 0, 45, 0 ), time );
|
|
||||||
wait( time );
|
foreach ( player in level.players )
|
||||||
model1 rotateto( model1.angles + ( 0, -45, 0 ), time );
|
{
|
||||||
model2 rotateto( model2.angles + ( 0, -45, 0 ), time );
|
if ( !isAlive( player ) )
|
||||||
wait( time );
|
{
|
||||||
model1 rotateto( model1.angles + ( 10, 45, 0 ), time );
|
continue;
|
||||||
model2 rotateto( model2.angles + ( 10, 45, 0 ), time );
|
|
||||||
wait( time );
|
|
||||||
model1 rotateto( model1.angles + ( -10, -45, 0 ), time );
|
|
||||||
model2 rotateto( model2.angles + ( -10, -45, 0 ), time );
|
|
||||||
wait( time );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( player.origin[2] < -350.0 ) // -2948.0 <- water level
|
||||||
|
{
|
||||||
|
player suicide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ main()
|
|||||||
|
|
||||||
precacheFX()
|
precacheFX()
|
||||||
{
|
{
|
||||||
level._effect[ "pipe_steam" ] = LoadFX( "impacts/pipe_steam" );
|
level._effect[ "pipe_steam" ] = loadfx( "impacts/pipe_steam" );
|
||||||
level._effect[ "firelp_small_pm_nolight" ] = loadfx( "fire/firelp_small_pm_nolight" );
|
level._effect[ "firelp_small_pm_nolight" ] = loadfx( "fire/firelp_small_pm_nolight" );
|
||||||
level._effect[ "firelp_small_pm" ] = loadfx( "fire/firelp_small_pm" );
|
level._effect[ "firelp_small_pm" ] = loadfx( "fire/firelp_small_pm" );
|
||||||
level._effect[ "minigun_shell_eject" ] = loadfx( "shellejects/20mm_mp" );
|
level._effect[ "minigun_shell_eject" ] = loadfx( "shellejects/20mm_mp" );
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user