4 Commits
Author SHA1 Message Date
Legonzaur 552078bb29 Update mod.json 2022-08-01 14:55:59 +02:00
Legonzaur 33be9bf439 Merge pull request #5 from fvnkhead/main
Attempt negative charge count fix
2022-08-01 14:53:56 +02:00
fvnkhead f0ebe74408 Attempt negative charge count fix 2022-07-27 06:53:53 +00:00
legonzaur 1b56e6a24c Imagine publishing with a console log at each tick 2022-03-13 19:33:14 +01:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"Name": "Legonzaur.HoloShift", "Name": "Legonzaur.HoloShift",
"Description": "Swap positions with your beloved decoy", "Description": "Swap positions with your beloved decoy",
"Version": "1.0.6", "Version": "1.0.8",
"LoadPriority": 2, "LoadPriority": 2,
"Scripts": [ "Scripts": [
{ {
+1 -1
View File
@@ -32,8 +32,8 @@ bool IsLaunched = false
Assert(player) Assert(player)
if(!player.IsPhaseShifted()){ if(!player.IsPhaseShifted()){
if(player in playerDecoyActiveFrom){ if(player in playerDecoyActiveFrom){
print("test")
float chargeCount = float(player.GetOffhandWeapon(1).GetWeaponPrimaryClipCountMax()) - ((Time() - playerDecoyActiveFrom[player])*rechargeMultiplier) float chargeCount = float(player.GetOffhandWeapon(1).GetWeaponPrimaryClipCountMax()) - ((Time() - playerDecoyActiveFrom[player])*rechargeMultiplier)
chargeCount = max(chargeCount, 0.0) // can be negative in weird cases
player.GetOffhandWeapon(1).SetWeaponPrimaryClipCount(int(chargeCount)) player.GetOffhandWeapon(1).SetWeaponPrimaryClipCount(int(chargeCount))
} }
} }