Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combat Lighting
#2
Bullets= is indeed unused. The Bright brothers are more complex (and stupid). I looked into this part a while ago when Marshall asked me to.

A Combat Light flash is generated by a function that is told how much damage was dealt (before any verses or other stuff), the Warhead to use, which shades to disable (same as CLDisablexx most of the time), and a bool to force a flash even without the warhead's approval. (Is Department Of Redundancy Department hiring?)

When a weapon is fired, it creates a Bullet (projectile). It is told, among other things, the Warhead to use on impact, the maximum Speed , and "Brightness" (in most cases that is Weapon->Bright).

When a bullet impacts, if it was given a "Brightness" of true, it calls on the flash maker function. It gives that function the right damage, the right warhead, the right CL flags, but tells it to force a flash. Hence, Warhead->Bright is ignored in this case.

When a bullet airbursts, it spawns child projectiles. But those projectiles are always told "Speed = 50, Brightness = 0". IOW, airburst weapons never get flashes even when the INI code tells them to.
Cluster weapons receive the correct settings though.

Projectiles are also created without firing a weapon:
NukeMaker=yes spawns a Bullet which takes its stats from [NukePayload], but "Brightness = 1".

Flashes are also created without a projectile, and these do obey Warhead->Bright most of the time:
An expiring Animation with an ExpireAnim and Warhead set - Animation->Damage, Animation->Warhead, obeys Warhead settings.
An activating Laser Fence post killing a unit - Unit->Health, Rules->C4Warhead, obeys.
Unit collecting Crate containing Explosives - Unit->Health, Rules->C4Warhead, obeys.
Old hardcoded IonCannon firing - Rules->IonCannonDamage, Rules->IonCannonWarhead, obeys.
Map Actions "Small/Medium/Large Light Flash" - 50/100/300, Rules->C4Warhead, obeys.
Map Action "Do Explosion" - assignedWeapon->Damage, assignedWeapon->Warhead, obeys.
Bullet hitting an Iron Curtained unit - Bullet->Damage * 2, Bullet->Warhead, forces a Red flash.
(What I assume to be) Magnetron dropping a unit on an obstacle - Unit->Health, Rules->C4Warhead, obeys.
Voxel Anim on impact - VoxelAnim->Damage, VoxelAnim->Warhead, obeys.

Worth playing: 1 | 2 | 3
Reply


Messages In This Thread
Combat Lighting - by Vinifera7 - 04.06.2008, 00:18:38
RE: Combat Lighting - by DCoder - 04.06.2008, 10:15:22
RE: Combat Lighting - by Vinifera7 - 04.06.2008, 18:33:56
RE: Combat Lighting - by Marshall - 04.06.2008, 19:02:43



Users browsing this thread: 1 Guest(s)