Summons with hostile_on_attack set

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Summons with hostile_on_attack set

#1 Post by yufra »

Here is a fun bug. Anorithil are members of the Sunwall faction, which have the hostile_on_attack flag set to true. This means that any creatures summoned by an Anorithil, say by an artifact, will be set to the same faction and also have hostile_on_attack. When those creatures are killed by the time limit a call to NPC:die with no src provided (/mod/class/ai/summon.lua:26) yields the following bug:

Code: Select all

[LOG]	#PINK#Your summoned ninurlhing disappears.
Lua Error: /mod/class/NPC.lua:92: attempt to index local 'src' (a nil value)
	At [C]:-1 
	At /mod/class/NPC.lua:92 die
	At /mod/ai//summon.lua:26 
	At (tail call):-1 
	At (tail call):-1 
	At /mod/class/NPC.lua:43 act
	At /engine/GameEnergyBased.lua:73 tick
	At /engine/GameTurnBased.lua:44 tick
	At /mod/class/Game.lua:453 
Maybe the if statement on line 91 of /mod/class/NPC.lua should grow a "and src" check?
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Summons with hostile_on_attack set

#2 Post by darkgod »

Well spotted! :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply