Skip to content

Commit fd3caa8

Browse files
committed
Add prototype of partial reloading
1 parent 77dd547 commit fd3caa8

File tree

14 files changed

+3239
-1268
lines changed

14 files changed

+3239
-1268
lines changed

Packages/org.centurioncc.system/Runtime/Gun/Behaviour/CockingGunBehaviour.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ public override void OnGunUpdate(GunBase instance)
238238
var hasSucceeded = shotResult == ShotResult.Succeeded || shotResult == ShotResult.SucceededContinuously;
239239
if (hasSucceeded && isBlowBack)
240240
{
241-
instance.HasCocked = true;
242241
instance.LoadBullet();
242+
instance.HasCocked = true;
243243
}
244244
}
245245

Packages/org.centurioncc.system/Runtime/Gun/Behaviour/DefaultGunBehaviour.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public override void OnGunUpdate(GunBase instance)
2222
{
2323
if (instance.Trigger == TriggerState.Firing)
2424
{
25+
if (!instance.HasBulletInChamber)
26+
instance.LoadBullet();
27+
2528
var shotResult = instance.TryToShoot();
2629
var hasSucceeded = shotResult == ShotResult.Succeeded || shotResult == ShotResult.SucceededContinuously;
2730
if (hasSucceeded)

0 commit comments

Comments
 (0)