Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions luarules/configs/collisionvolumes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ pieceCollisionVolume['legmohoconct'] = {
['0']={70,30,70,0,-3,0,1,1},
['1']={21,16,30,0,-3,-1,2,1},
}
pieceCollisionVolume['legkeres'] = {
['0']={58,22,68,0,-6,1,2,0},
['2']={44,19,48,0,9.5,2,2,0},
}

for name, v in pairs(pieceCollisionVolume) do
for udid, ud in pairs(UnitDefs) do
Expand Down
Binary file modified objects3d/Units/legkeres.s3o
Binary file not shown.
Binary file modified objects3d/Units/legkeres_dead.s3o
Binary file not shown.
35 changes: 25 additions & 10 deletions scripts/Units/legkeres.bos
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "sfxtype.h"
#include "exptype.h"

piece base, turret, gun, sleeve, lgun, lgatling, rgun, rgatling, flare, lflare, rflare;
piece base, turret, gun, barrel, lgun, lgatling, rgun, rgatling, flare, lflare, rflare, sleeve1, sleeve2, fan;

static-var restore_delay, last_gun_heading;

Expand Down Expand Up @@ -39,6 +39,15 @@ Create()
hide flare;
hide rflare;
hide lflare;
if (rand(1, 5) == 5)
{
hide sleeve2;
}
else
{
hide sleeve1;
}
spin fan around y-axis speed <-300.000000> accelerate <30>;
restore_delay = 3000;
}

Expand Down Expand Up @@ -101,9 +110,13 @@ FirePrimary()
{
emit-sfx 1024 + 0 from flare;
start-script Rock_Main_Cannon();
move sleeve to z-axis [-2.400000] speed [500.000000];
wait-for-move sleeve along z-axis;
move sleeve to z-axis [0.000000] speed [3.000000];
move barrel to z-axis [-6] speed [500.000000];
move sleeve1 to z-axis [-6] speed [500.000000];
move sleeve2 to z-axis [-6] speed [500.000000];
wait-for-move barrel along z-axis;
move barrel to z-axis [0.000000] speed [4.000000];
move sleeve1 to z-axis [0.000000] speed [4.000000];
move sleeve2 to z-axis [0.000000] speed [4.000000];
}
Comment on lines +117 to 120

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The barrel restore is too slow for the unit at its maximum reload time reduction


AimFromPrimary(piecenum)
Expand All @@ -121,6 +134,7 @@ AimSecondary(heading, pitch)
signal SIG_AIM_2;
set-signal-mask SIG_AIM_2;
turn lgun to x-axis <0.000000> - pitch speed <50.000000>;
turn turret to y-axis heading speed <90.000000>;

start-script RestoreAfterDelay();
return (1);
Expand All @@ -142,7 +156,7 @@ Shot2(zero)

AimFromSecondary(piecenum)
{
piecenum = lgun;
piecenum = gun;
}
Comment on lines +159 to 160

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems correct to do but worth adding a note that we are intentionally aiming from a different weapon piece (could help debugging something later)


QuerySecondary(piecenum)
Expand All @@ -155,6 +169,7 @@ AimTertiary(heading, pitch)
signal SIG_AIM_3;
set-signal-mask SIG_AIM_3;
turn rgun to x-axis <0.000000> - pitch speed <50.000000>;
turn turret to y-axis heading speed <90.000000>;

start-script RestoreAfterDelay();
return (1);
Expand All @@ -176,7 +191,7 @@ Shot3(zero)

AimFromTertiary(piecenum)
{
piecenum = rgun;
piecenum = gun;
}

QueryTertiary(piecenum)
Expand All @@ -197,7 +212,7 @@ Killed(severity, corpsetype)
explode base type BITMAPONLY | NOHEATCLOUD;
explode turret type BITMAPONLY | NOHEATCLOUD;
//explode gun type BITMAPONLY | NOHEATCLOUD;
explode sleeve type FIRE | SMOKE | FALL | NOHEATCLOUD;
//explode barrel type FIRE | SMOKE | FALL | NOHEATCLOUD;
//explode flare type BITMAPONLY | NOHEATCLOUD;
return(corpsetype);
}
Expand All @@ -207,7 +222,7 @@ Killed(severity, corpsetype)
explode base type BITMAPONLY | NOHEATCLOUD;
explode turret type FALL | NOHEATCLOUD;
explode gun type FALL | NOHEATCLOUD;
explode sleeve type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode barrel type FIRE | SMOKE | FALL | NOHEATCLOUD;
//explode flare type FIRE | SMOKE | FALL | NOHEATCLOUD;
return(corpsetype);
}
Expand All @@ -217,15 +232,15 @@ Killed(severity, corpsetype)
explode base type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode turret type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD;
explode gun type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode sleeve type EXPLODE_ON_HIT | 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 gun type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode sleeve 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 modified scripts/Units/legkeres.cob
Binary file not shown.
Binary file modified unitpics/legkeres.dds
Binary file not shown.
1 change: 1 addition & 0 deletions units/Legion/T3/legkeres.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ return {
collisionvolumeoffsets = "0 -2 0",
collisionvolumescales = "52 34 64",
collisionvolumetype = "Box",
usePieceCollisionVolumes = true,
corpse = "DEAD",
explodeas = "explosiont3",
footprintx = 5,
Expand Down
Loading