Incorrect Spots coordinates generated with Town Sublevels

Moderator: Moderator

Post Reply
Message
Author
Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Incorrect Spots coordinates generated with Town Sublevels

#1 Post by Hachem_Muche »

Using the Town.lua map generator in a sublevel produces incorrect coordinates for spots. The spots coordinates appear to be computed from the sublevel starting coordinates rather than the main level starting coordinates, which can result in incorrectly placed effects.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: Incorrect Spots coordinates generated with Town Sublevel

#2 Post by Hachem_Muche »

A small typo in the svn update (which also breaks 2 of the pride maps):

Code: Select all

Index: game/engines/default/engine/generator/map/Static.lua
===================================================================
--- game/engines/default/engine/generator/map/Static.lua	(revision 6410)
+++ game/engines/default/engine/generator/map/Static.lua	(working copy)
@@ -302,7 +302,7 @@
 		end
 
 		if not generator.auto_handle_spot_offsets then
-			for spot in ipairs(subspots) do
+			for i, spot in ipairs(subspots) do
 				spot.x = spot.x + data.__import_offset_x
 				spot.y = spot.y + data.__import_offset_y
 			end
Incidentally, this is another bug for which the engine creates no useful error messages.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

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

Re: Incorrect Spots coordinates generated with Town Sublevel

#3 Post by darkgod »

Ah oups; never code when tired ;)
[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