Punpun guns (#5563)
* turn clumsygunns off on punpun (this shit broken) * fix * punpun fails 20% of the time, new clumsygunshootcheck system
This commit is contained in:
parent
fe7643caa3
commit
f6759ea97b
|
|
@ -26,6 +26,14 @@ public sealed partial class ClumsyComponent : Component
|
|||
[DataField, AutoNetworkedField]
|
||||
public float ClumsyDefaultCheck = 0.5f;
|
||||
|
||||
// Begin DeltaV Changes - Gun
|
||||
/// <summary>
|
||||
/// Chance for a clumsy entity to fail when shooting a weapon
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public float ClumsyGunShootCheck = 0.5f;
|
||||
// End DeltaV Changes - Gun
|
||||
|
||||
/// <summary>
|
||||
/// Default stun time.
|
||||
/// If a system needs to use something else, add a new variable in the component, do not modify this number.
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public sealed class ClumsySystem : EntitySystem
|
|||
// TODO: Replace with RandomPredicted once the engine PR is merged
|
||||
var seed = SharedRandomExtensions.HashCodeCombine((int)_timing.CurTick.Value, GetNetEntity(args.Gun).Id);
|
||||
var rand = new System.Random(seed);
|
||||
if (!rand.Prob(ent.Comp.ClumsyDefaultCheck))
|
||||
if (!rand.Prob(ent.Comp.ClumsyGunShootCheck)) // DeltaV change from default to gun check
|
||||
return;
|
||||
|
||||
if (ent.Comp.GunShootFailDamage != null)
|
||||
|
|
|
|||
|
|
@ -917,6 +917,10 @@
|
|||
attributes:
|
||||
proper: true
|
||||
gender: male
|
||||
#DeltaV Changes - he can shoot his gun 80% of the time
|
||||
- type: Clumsy
|
||||
clumsyGunShootCheck: 0.2
|
||||
#DeltaV Changes end
|
||||
|
||||
- type: entity
|
||||
name: Tropico
|
||||
|
|
|
|||
Loading…
Reference in New Issue