The Redeemer (self controllable rocket nuke) but with normal rocket explosion.

First time requesting something so be kind if I do something wrong.

This pack

Contains a weapon called “The Redeemer”, it´s a rocket launcher that you are able to control the rockets path by your self in first person view.

However it is very fun to fly around but less amusing when you crash (nuclear explosion) so if someone would be so kind to change the nuke explosion to a normal rocket explosion, Please.

Here is the the lua-code, if you don’t want to download the pack and is good enough with lua so you don´t need to test first.
[LUA]local sndRPGFire = Sound(“Weapon_RPG.Single”)
REDEEMER = {}

if (SERVER) then

AddCSLuaFile( "shared.lua" )
AddCSLuaFile( "cl_init.lua" )
SWEP.Weight				= 5
SWEP.AutoSwitchTo		= true
SWEP.AutoSwitchFrom		= true

SWEP.HoldType			= "rpg"

end

if ( CLIENT ) then

SWEP.DrawAmmo			= true
SWEP.DrawCrosshair		= true
SWEP.ViewModelFOV		= 64
SWEP.ViewModelFlip		= false
SWEP.CSMuzzleFlashes	= false


SWEP.PrintName			= "The Redeemer"			
SWEP.Author				= "Teta_Bonita"
SWEP.Category			= "Nuclear Warfare"
SWEP.Slot				= 3
SWEP.SlotPos			= 10

end

SWEP.Author = “Teta_Bonita”
SWEP.Contact = “”
SWEP.Purpose = “”
SWEP.Instructions = “Aim away from face”

SWEP.Spawnable = false
SWEP.AdminSpawnable = true

SWEP.ViewModel = “models/weapons/v_rpg.mdl”
SWEP.WorldModel = “models/weapons/w_rocket_launcher.mdl”

SWEP.Primary.Recoil = 0
SWEP.Primary.Damage = -1
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0
SWEP.Primary.Delay = 2

SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = 2
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = “slam”
SWEP.Primary.NextFire = 0

SWEP.Secondary.Recoil = 0
SWEP.Secondary.Damage = -1
SWEP.Secondary.NumShots = 1
SWEP.Secondary.Cone = 0
SWEP.Secondary.Delay = 0.3

SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = true
SWEP.Secondary.Ammo = “none”
SWEP.Secondary.NextFire = 0

SWEP.Rocket = SWEP.Rocket or NULL
SWEP.IsGuidingNuke = false
SWEP.DrawReticle = false
SWEP.LastAng = Vector(0,0,0)

function SWEP:Initialize()

if ( SERVER ) then
	self:SetWeaponHoldType( self.HoldType )
end

end

function SWEP:Deploy()

self.Owner:SetNWBool("DrawReticle",false)

end

function SWEP:Reload()
if self.Rocket and self.Rocket:IsValid() then return false end
self.Weapon:DefaultReload( ACT_VM_RELOAD )
end

function SWEP:Think()

if self.IsGuidingNuke and self.Rocket and self.Rocket:IsValid() then
	local PlayerAng = self.Owner:GetAimVector()
	self.Rocket:SetAngles(PlayerAng:Angle())
	self.RocketPhysObj:SetVelocity(PlayerAng*1200)
	
	local ViewEnt = self.Owner:GetViewEntity() -- we should be able to do this client-side, but for some fucking reason GetViewEntity() is server only
	
	if self.DrawReticle and ViewEnt ~= self.Rocket then
		self.DrawReticle = false
		self.Owner:SetNWBool("DrawReticle",false)
	end
	
	if not self.DrawReticle and ViewEnt == self.Rocket then
		self.DrawReticle = true
		self.Owner:SetNWBool("DrawReticle",true)
	end
	
	if ViewEnt == self.Owner or ViewEnt == NULL then
		self.Owner:SetViewEntity(self.Rocket) 
	end
	
else
	self:StopGuiding()
end

end

function SWEP:PrimaryAttack()

if self.Primary.NextFire > CurTime() or self.Owner:GetAmmoCount("slam") < 1 then 
return end

self.Primary.NextFire = CurTime() + self.Primary.Delay

if self.IsGuidingNuke and self.Rocket and self.Rocket:IsValid() then
	self:StopGuiding()
	local nuke = ents.Create("sent_nuke")
	nuke:SetPos( self.Rocket:GetPos() )
	nuke:SetOwner(self.Owner)
	nuke:Spawn()
	nuke:Activate()
	self.Rocket:Remove()
	
	return
end

self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
self.Weapon:EmitSound(sndRPGFire)
self.Owner:MuzzleFlash()

self:TakePrimaryAmmo(1)

local PlayerPos = self.Owner:GetShootPos()
local PlayerAng = self.Owner:GetAimVector()

--the muzzle attachement for the rocket launcher is fucked, so we need to adjust the missile's position by hand
local PlayerForward = self.Owner:GetForward()
local PlayerRight = self.Owner:GetRight()
local SpawnPos = PlayerPos + 32*PlayerForward + 32*PlayerRight

local trace = {}
trace.start = PlayerPos + PlayerAng*32
trace.endpos = PlayerPos + PlayerAng*16384
trace.filter = {self.Owner}
local traceRes = util.TraceLine(trace)

self.Rocket = ents.Create("sent_nuke_missile")
self.Rocket:SetVar("owner",self.Owner)
self.Rocket:SetPos(SpawnPos)
self.Rocket:SetAngles(PlayerAng:Angle())
self.Rocket:Spawn()
self.Rocket:Activate()

self.RocketPhysObj = self.Rocket:GetPhysicsObject()
self.RocketPhysObj:SetVelocity(PlayerAng*512 - 16*PlayerRight + Vector(0,0,256))

timer.Simple(0.5, REDEEMER.AimRocket, self.Rocket, traceRes.HitPos)

end

function SWEP:SecondaryAttack()

if self.Secondary.NextFire > CurTime() then 
return end

self.Secondary.NextFire = CurTime() + self.Secondary.Delay

if self.IsGuidingNuke then
	self:StopGuiding()
else
	self:StartGuiding()
end

end

function SWEP:StartGuiding()

if not self.Rocket or self.Rocket == NULL then return end

self.LastAng = self.Owner:EyeAngles()
self.Owner:SetEyeAngles(self.Rocket:GetAngles())

self.IsGuidingNuke = true
self.DrawReticle = true
self.Owner:SetNWBool("DrawReticle",true)
self.Owner:SetViewEntity(self.Rocket)

if SERVER then
	self.Owner:DrawViewModel(false) --we need to hide the viewmodel while we're guiding the rocket.  Otherwise it would look fugly.
	self.Owner:CrosshairDisable()
end

end

function SWEP:StopGuiding()

if not self.IsGuidingNuke then return end

self.IsGuidingNuke = false
self.DrawReticle = false
self.Owner:SetNWBool("DrawReticle",false)
self.Owner:SetViewEntity(self.Owner)

if SERVER then
	self.Owner:DrawViewModel(true)
	self.Owner:CrosshairEnable()
end

self.Owner:SetEyeAngles(self.LastAng)

end

function REDEEMER.AimRocket(rocket,pos)

local NewAng = (pos - rocket:GetPos()):GetNormalized()
rocket:SetAngles(NewAng:Angle())

end

function SWEP:Holster()

self:StopGuiding()
return true

end

function SWEP:OnRemove()

self:StopGuiding()
return true

end[/LUA]

ok i’m new to lua and all but from what i can read and understand the swep simply spawns a sent for the rocket containing the nuke payload… i’m not 100% sure so ill leave it to someone with a bit more knowledge, though my guess is that you would simply modify the sent’s related to the rocket and remove the warhead/payload and replace it with a simple env_explosion, lower blast radius and less damage? although it does have console commands for nuke yield etc so without looking through it i can’t say.

again i’m new to lua and all so i’m still learning just my 2 cents i could be completely wrong.

though it would be nice to have guided missiles =D

edit: ok it’s a hell of alot more complicated than that lol convars involved, blast radious and damage calculation dependent upon those, sents being called upon… beyond me lol

Try to modify line 134:
local nuke = ents.Create(“sent_nuke”)
to:
local nuke = ents.Create(“rpg_round”)

I’m not sure about this, but it can work

What about this?

go to entities folder and replace the 3 files in sent_nuke folder with another sent. im currently searching what i can use for this…
(i testet with cinematic airstrike and it works)