Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalwk77 committed Jul 8, 2023
1 parent 0d0c453 commit 5909779
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion INDEV/Battle Royale/loot/spoils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function spoils:giveAmmo(args)
local weapon = self:getWeapon(object)

--- for explosive bullets:
weapon.velocity = 10
weapon.velocity = 1000
weapon.distance = 0.5
weapon.projectile = self.rocket_projectile
--
Expand Down
17 changes: 10 additions & 7 deletions INDEV/Battle Royale/weapons/weapons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,15 @@ function weapons:createProjectile(dyn, weapon)
local id = self.id
local px, py, pz = self:getXYZ(dyn)

local xAim = math.sin(read_float(dyn + 0x230))
local yAim = math.sin(read_float(dyn + 0x234))
local zAim = math.sin(read_float(dyn + 0x238))
local xAim = math.sin(read_float(dyn + 0x230))
local yAim = math.sin(read_float(dyn + 0x234))
local zAim = math.sin(read_float(dyn + 0x238))

local distance = 0.3
local xVel = weapon.velocity * xAim
local yVel = weapon.velocity * yAim
local zVel = weapon.velocity * zAim

local distance = weapon.distance
local x = px + (distance * xAim)
local y = py + (distance * yAim)
local z = pz + (distance * zAim)
Expand All @@ -127,9 +130,9 @@ function weapons:createProjectile(dyn, weapon)
local object = get_object_memory(rocket)

if (rocket and object ~= 0) then
write_float(object + 0x68, weapon.velocity * xAim)
write_float(object + 0x6C, weapon.velocity * yAim)
write_float(object + 0x70, weapon.velocity * zAim)
write_float(object + 0x68, xVel)
write_float(object + 0x6C, yVel)
write_float(object + 0x70, zVel)
end
end
end
Expand Down

0 comments on commit 5909779

Please sign in to comment.