forked from beyond-all-reason/Beyond-All-Reason
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bos cleanup merge7 (beyond-all-reason#3326)
* legbar clean * legbart clean * legbastion clean * legcen_clean * legcib clean * legdrone clean * attack ao linewidth min clamp * legfig_clean * legfloat clean * legfort clean * leggat clean * leggob clean
- Loading branch information
Showing
23 changed files
with
3,529 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
|
||
#include "../recoil_common_includes.h" | ||
|
||
// Signal definitions | ||
#define SIGNAL_MOVE 1 | ||
#define SIGNAL_AIM 2 | ||
|
||
piece base, tracks, shell, aimy1, turret, aimx1, sleeve, barrel, cover, flare; | ||
|
||
static-var restore_delay, currentSpeed, moveSpeed; | ||
|
||
|
||
#define TB_BASE base | ||
#define TB_TURNRATE <15.0> | ||
#define TB_TILT_X <0.1> | ||
#define TB_BANK_Z <0.1> // Do not define this if you dont want banking | ||
#include "../tilt_bank_mobileunit.h" | ||
|
||
#define BASEPIECE base | ||
#define HITSPEED <85.0> | ||
//how 'heavy' the unit is, on a scale of 1-10 | ||
#define UNITSIZE 2 | ||
#define MAXTILT 100 | ||
#define RECOIL_POWER 50000 | ||
#include "../unit_hitbyweaponid_and_smoke.h" | ||
|
||
|
||
Create() | ||
{ | ||
hide flare; | ||
restore_delay = 3000; | ||
call-script TB_Init(); | ||
SLEEP_UNTIL_UNITFINISHED; | ||
} | ||
|
||
StartMoving(reversing) | ||
{ | ||
signal SIGNAL_MOVE; | ||
set-signal-mask SIGNAL_MOVE; | ||
START_TILTBANK; | ||
} | ||
|
||
StopMoving() | ||
{ | ||
signal SIGNAL_MOVE; | ||
STOP_TILTBANK; | ||
} | ||
|
||
SetMaxReloadTime(reloadMS) | ||
{ | ||
restore_delay = reloadMS * 2; | ||
} | ||
|
||
static-var Stunned; | ||
ExecuteRestoreAfterDelay() | ||
{ | ||
if (Stunned) { | ||
return (1); | ||
} | ||
turn aimy1 to y-axis <0.000000> speed <90>; | ||
turn aimx1 to x-axis <0.000000> speed <50>; | ||
} | ||
|
||
SetStunned(State) | ||
{ | ||
Stunned = State; | ||
if (!Stunned) { | ||
start-script ExecuteRestoreAfterDelay(); | ||
} | ||
} | ||
|
||
RestoreAfterDelay() | ||
{ | ||
sleep restore_delay; | ||
start-script ExecuteRestoreAfterDelay(); | ||
|
||
move turret to y-axis [0] speed [5]; | ||
move barrel to z-axis [0] speed [15]; | ||
turn cover to x-axis <0> speed <400>; | ||
} | ||
|
||
AimPrimary(heading, pitch) | ||
{ | ||
signal SIGNAL_AIM; | ||
set-signal-mask SIGNAL_AIM; | ||
|
||
move turret to y-axis [4] speed [10]; | ||
move barrel to z-axis [5] speed [7.5]; | ||
turn cover to x-axis <160> speed <200>; | ||
|
||
turn aimy1 to y-axis heading speed <90.000000>; | ||
turn aimx1 to x-axis <0.000000> - pitch speed <50.000000>; | ||
|
||
wait-for-turn aimy1 around y-axis; | ||
wait-for-turn aimx1 around x-axis; | ||
|
||
start-script RestoreAfterDelay(); | ||
return (1); | ||
} | ||
|
||
FirePrimary() | ||
{ | ||
emit-sfx 1024 + 0 from flare; | ||
move barrel to z-axis [2.500000] speed [500.000000]; | ||
turn cover to x-axis <100> speed <500>; | ||
wait-for-move barrel along z-axis; | ||
move barrel to z-axis [5.000000] speed [3.000000]; | ||
turn cover to x-axis <160> speed <150>; | ||
} | ||
|
||
AimFromPrimary(piecenum) | ||
{ | ||
piecenum = aimx1; | ||
} | ||
|
||
QueryPrimary(piecenum) | ||
{ | ||
piecenum = flare; | ||
} | ||
|
||
SweetSpot(piecenum) | ||
{ | ||
piecenum = turret; | ||
} | ||
|
||
Killed(severity, corpsetype) | ||
{ | ||
if( severity <= 25 ) | ||
{ | ||
corpsetype = 1 ; | ||
explode base type BITMAPONLY | NOHEATCLOUD; | ||
explode turret type BITMAPONLY | NOHEATCLOUD; | ||
//explode shell type BITMAPONLY | NOHEATCLOUD; | ||
explode barrel type FIRE | SMOKE | FALL | NOHEATCLOUD; | ||
//explode flare type BITMAPONLY | NOHEATCLOUD; | ||
return(corpsetype); | ||
} | ||
if( severity <= 50 ) | ||
{ | ||
corpsetype = 2 ; | ||
explode base type BITMAPONLY | NOHEATCLOUD; | ||
explode turret type FALL | NOHEATCLOUD; | ||
explode shell type FALL | NOHEATCLOUD; | ||
explode barrel type FIRE | SMOKE | FALL | NOHEATCLOUD; | ||
//explode flare type FIRE | SMOKE | FALL | NOHEATCLOUD; | ||
return(corpsetype); | ||
} | ||
if( severity <= 99 ) | ||
{ | ||
corpsetype = 3 ; | ||
explode base type FIRE | SMOKE | FALL | NOHEATCLOUD; | ||
explode turret type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD; | ||
explode shell type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; | ||
explode barrel type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD; | ||
//explode flare type FIRE | SMOKE | FALL | NOHEATCLOUD; | ||
return(corpsetype); | ||
} | ||
corpsetype = 3 ; | ||
explode base type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; | ||
explode turret type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; | ||
explode shell type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; | ||
explode barrel type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; | ||
//explode flare type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; | ||
return corpsetype; | ||
} |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.