r5116 - trunk/misc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Nov 27 03:14:57 EST 2008


Author: div0
Date: 2008-11-27 03:14:57 -0500 (Thu, 27 Nov 2008)
New Revision: 5116

Modified:
   trunk/misc/assault-circuit-board-creator.pl
Log:
fix offset handling


Modified: trunk/misc/assault-circuit-board-creator.pl
===================================================================
--- trunk/misc/assault-circuit-board-creator.pl	2008-11-27 08:10:44 UTC (rev 5115)
+++ trunk/misc/assault-circuit-board-creator.pl	2008-11-27 08:14:57 UTC (rev 5116)
@@ -104,16 +104,17 @@
 	{
 		my $xx = $x - 32;
 		my $yy = $y + ($_ - 3.5) * 64;
+		my $zz = $z - 8 - 32; # align feet to 64-grid
 		push @l, Entity
 			classname => "info_player_attacker",
 			target => $target,
-			origin => "$xx $yy $z";
+			origin => "$xx $yy $zz";
 
 		$xx = $x + 32;
 		push @l, Entity
 			classname => "info_player_defender",
 			target => $target,
-			origin => "$xx $yy $z";
+			origin => "$xx $yy $zz";
 	}
 
 	return @l;
@@ -124,13 +125,13 @@
 my $obj_prev = undef;
 my $des_prev = undef;
 
-my @prevorigin = (-256, 0, 0);
+my @prevorigin = @ofs;
 
 for my $i(0.. at objectives - 1)
 {
 	my @origin =
 	(
-		$ofs[0] + $i * 256,
+		$ofs[0] + ($i + 1) * 256,
 		$ofs[1] + 0,
 		$ofs[2] + 0
 	);
@@ -250,7 +251,7 @@
 my $obj = "roundend";
 my @origin =
 (
-	$ofs[0] + @objectives * 256,
+	$ofs[0] + (@objectives + 1) * 256,
 	$ofs[1] + 0,
 	$ofs[2] + 0
 );




More information about the nexuiz-commits mailing list