pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r4170 - in branches/pingus-hanusz/src: . worldobjs


From: grumbel
Subject: [Pingus-CVS] r4170 - in branches/pingus-hanusz/src: . worldobjs
Date: Sat, 18 Jun 2011 04:22:38 +0200

Author: grumbel
Date: 2011-06-18 04:22:38 +0200 (Sat, 18 Jun 2011)
New Revision: 4170

Modified:
   branches/pingus-hanusz/src/worldobj_factory.cpp
   branches/pingus-hanusz/src/worldobjs/guillotine.cpp
Log:
Added trap-exit that behaves differently depending on good/evil mode


Modified: branches/pingus-hanusz/src/worldobj_factory.cpp
===================================================================
--- branches/pingus-hanusz/src/worldobj_factory.cpp     2011-06-17 21:13:06 UTC 
(rev 4169)
+++ branches/pingus-hanusz/src/worldobj_factory.cpp     2011-06-18 02:22:38 UTC 
(rev 4170)
@@ -101,9 +101,15 @@
       new WorldObjFactoryImpl<Liquid>("liquid");
       new WorldObjFactoryImpl<Hotspot>("hotspot");
       new WorldObjFactoryImpl<Entrance>("entrance");
-                       new WorldObjFactoryImpl<WoodThing>("woodthing");
+      new WorldObjFactoryImpl<WoodThing>("woodthing");
       new WorldObjFactoryImpl<Exit>("exit");
 
+#ifdef PINGUS_MODE_EVIL
+      new WorldObjFactoryImpl<Exit>("trap-exit");
+#else
+      new WorldObjFactoryImpl<Guillotine>("trap-exit");
+#endif
+
       // traps
       new WorldObjFactoryImpl<FakeExit>("fake_exit");
       new WorldObjFactoryImpl<Guillotine>("guillotine");

Modified: branches/pingus-hanusz/src/worldobjs/guillotine.cpp
===================================================================
--- branches/pingus-hanusz/src/worldobjs/guillotine.cpp 2011-06-17 21:13:06 UTC 
(rev 4169)
+++ branches/pingus-hanusz/src/worldobjs/guillotine.cpp 2011-06-18 02:22:38 UTC 
(rev 4170)
@@ -33,6 +33,12 @@
     killing(false)
 {
   reader.read_vector("position", pos);
+
+  if (reader.get_name() == "trap-exit")
+  {
+    pos.x -= 40;
+    pos.y -= 96;
+  }
   
   sprite_kill_right.set_play_loop(false);
   sprite_kill_left.set_play_loop(false);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]