rpms/rafkill/devel rafkill-1.2.2-shatter-crash.patch, NONE, 1.1 rafkill.spec, 1.4, 1.5
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Wed Sep 20 20:14:04 UTC 2006
Author: jwrdegoede
Update of /cvs/extras/rpms/rafkill/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25187
Modified Files:
rafkill.spec
Added Files:
rafkill-1.2.2-shatter-crash.patch
Log Message:
* Wed Sep 20 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.2.2-3
- Fix a crash when using the shattergun (bug 206823).
rafkill-1.2.2-shatter-crash.patch:
--- NEW FILE rafkill-1.2.2-shatter-crash.patch ---
--- rafkill-1.2.2/src/raptor.cpp~ 2006-09-20 21:27:37.000000000 +0200
+++ rafkill-1.2.2/src/raptor.cpp 2006-09-20 21:27:37.000000000 +0200
@@ -772,6 +772,9 @@
}
}
+// HACK HACK HACK
+Logic *globLogic;
+
void playLevel( PlayerObject * const player ){
char file_level[ 64 ];
sprintf( file_level, "level%d.lev", player->getLevel() );
@@ -784,6 +787,7 @@
// dumb_player.pause();
Drawer draw;
Logic logic;
+ globLogic = &logic;
LevelCreator level( file_level, player );
draw.setDrawLand( Configuration::getBackground() );
--- rafkill-1.2.2/src/weapons/weapon_shatter.cpp~ 2006-09-20 21:28:27.000000000 +0200
+++ rafkill-1.2.2/src/weapons/weapon_shatter.cpp 2006-09-20 21:28:27.000000000 +0200
@@ -6,6 +6,7 @@
#include "sound.h"
#include "hulls/hull_weapon_shatter.h"
#include "hulls/hull_weapon_machine.h"
+#include "logic.h"
Shatter::Shatter( int qx, int qy, double kx, double ky, HullObject * hnew, int al, vector< SpaceObject * > * Ammo ):
WeaponNode(qx,qy,kx,ky,hnew, al) {
@@ -19,6 +20,8 @@
// return ( getLife() <= 0 );
}
+extern Logic *globLogic;
+
void Shatter::Died(SpaceObject * check,ExplosionClass ** explr,int ME ){
Util::playSound( SND_SUSTAIN, 50 );
@@ -30,7 +33,7 @@
HullObject * add_h = new Machine_WHull( 1 );
add_h->life = 4;
- myAmmo->push_back( new Bounce(getX(),getY(),Tcos(ang)*2.1,Tsine(ang)*2.1,add_h,alignment ) );
+ globLogic->getObjects()->push_back( new Bounce(getX(),getY(),Tcos(ang)*2.1,Tsine(ang)*2.1,add_h,alignment ) );
//myAmmo->add( new Shatter(actualx,actualy,tcos[ang]*2.1,tsine[ang]*2.1, new Shatter_WHull(hull->strength/2), alignment, myAmmo ) );
}
Index: rafkill.spec
===================================================================
RCS file: /cvs/extras/rpms/rafkill/devel/rafkill.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- rafkill.spec 29 Aug 2006 05:59:04 -0000 1.4
+++ rafkill.spec 20 Sep 2006 20:14:03 -0000 1.5
@@ -1,6 +1,6 @@
Name: rafkill
Version: 1.2.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Top-down shooter with powerups
Group: Amusements/Games
License: GPL
@@ -11,6 +11,7 @@
Source3: rafkill.png
Patch0: rafkill-1.2.2-spell.patch
Patch1: rafkill-1.2.2-menu.patch
+Patch2: rafkill-1.2.2-shatter-crash.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: allegro-devel dumb-devel scons desktop-file-utils
@@ -24,6 +25,7 @@
%setup -q
%patch0 -p1 -z .spell
%patch1 -p1 -z .menu
+%patch2 -p1 -z .shatter
# sigh hack hack hack
FLAGS=""
for i in $RPM_OPT_FLAGS; do
@@ -34,7 +36,6 @@
%build
-export CCFLAGS="$RPM_OPT_FLAGS"
scons prefix=%{_datadir}
@@ -90,6 +91,9 @@
%changelog
+* Wed Sep 20 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.2.2-3
+- Fix a crash when using the shattergun (bug 206823).
+
* Tue Aug 29 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.2.2-2
- FE6 Rebuild
More information about the scm-commits
mailing list