Corrections to the file Onos_Server.lua :)

Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
edited January 2012 in NS2 General Discussion
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>function Onos:OnHiveDestroyed(hive, activeHiveCount)

local stompWeapon = self:GetWeapon(Stomp.kMapName)
local activeWeaponMapName = self:GetActiveWeapon():GetMapName()

if activeHiveCount < 3 and stompWeapon then
self:RemoveWeapon(stompWeapon)
end

if activeWeaponMapName == BileBomb.kMapName then
self:SetActiveWeapon(SpitSpray.kMapName)
end

end</div>

I think someone missed that when they copied the gorge file over as a basis, and it means the Onos won't switch to gore when the hive goes down :)

This is the corrected code for the Onos_Server.lua file.

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>function Onos:OnHiveDestroyed(hive, activeHiveCount)

local stompWeapon = self:GetWeapon(Stomp.kMapName)
local activeWeaponMapName = self:GetActiveWeapon():GetMapName()

if activeHiveCount < 3 and stompWeapon then
self:RemoveWeapon(stompWeapon)
end

if activeWeaponMapName == Stomp.kMapName then
self:SetActiveWeapon(Gore.kMapName)
end

end</div>

I'm just reading through the code at the moment to get a hang of it, but noticed this error, so thought I'd post it. I'm sure you'd notice it eventually. Not sure which section this should go in.
Sign In or Register to comment.