summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-11-09 08:57:23 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-11-09 08:57:23 +0000
commitc6d0c11faacc1fd0c1aa8354742957d7ec9ad78c (patch)
tree5ce81d82b485da5d920cdedfecd62a46e7da2d70
parentadded libtool dep (diff)
downloadhistorical-c6d0c11faacc1fd0c1aa8354742957d7ec9ad78c.tar.gz
historical-c6d0c11faacc1fd0c1aa8354742957d7ec9ad78c.tar.bz2
historical-c6d0c11faacc1fd0c1aa8354742957d7ec9ad78c.zip
Add patch from upstream bugzilla to fix crash. Reported by Florian Loitsch via bug #67812
-rw-r--r--games-action/orbital-eunuchs-sniper/ChangeLog7
-rw-r--r--games-action/orbital-eunuchs-sniper/Manifest5
-rw-r--r--games-action/orbital-eunuchs-sniper/files/1.29-ai.patch44
-rw-r--r--games-action/orbital-eunuchs-sniper/orbital-eunuchs-sniper-1.29.ebuild25
4 files changed, 65 insertions, 16 deletions
diff --git a/games-action/orbital-eunuchs-sniper/ChangeLog b/games-action/orbital-eunuchs-sniper/ChangeLog
index beef49242bab..f89cafc77012 100644
--- a/games-action/orbital-eunuchs-sniper/ChangeLog
+++ b/games-action/orbital-eunuchs-sniper/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-action/orbital-eunuchs-sniper
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/orbital-eunuchs-sniper/ChangeLog,v 1.6 2004/06/24 21:57:36 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/orbital-eunuchs-sniper/ChangeLog,v 1.7 2004/11/09 08:57:23 mr_bones_ Exp $
+
+ 09 Nov 2004; Michael Sterrett <mr_bones_@gentoo.org> +files/1.29-ai.patch,
+ orbital-eunuchs-sniper-1.29.ebuild:
+ Add patch from upstream bugzilla to fix crash. Reported by Florian Loitsch via
+ bug #67812
16 Feb 2004; Michael Sterrett <mr_bones_@gentoo.org>
orbital-eunuchs-sniper-1.29.ebuild:
diff --git a/games-action/orbital-eunuchs-sniper/Manifest b/games-action/orbital-eunuchs-sniper/Manifest
index 25296b952831..da2483e25e07 100644
--- a/games-action/orbital-eunuchs-sniper/Manifest
+++ b/games-action/orbital-eunuchs-sniper/Manifest
@@ -1,5 +1,6 @@
-MD5 f0943e92a6052b030e155ad533191eff orbital-eunuchs-sniper-1.29.ebuild 1476
-MD5 977894b4131aa476f51cf0c41e9c7b36 ChangeLog 1070
+MD5 4e854f8ff40fc0a113524aa771b99de8 ChangeLog 1281
+MD5 164659530b23f68e2351fe87a8065f7e orbital-eunuchs-sniper-1.29.ebuild 1495
MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
+MD5 477238dc90d5014c1170ec2e102d9c6c files/1.29-ai.patch 1861
MD5 f97829ecc792f2794277b8aec6a11e07 files/digest-orbital-eunuchs-sniper-1.29 80
MD5 8c689e156112d15da15aa7a5753e7f1c files/1.29-gentoo-paths.patch 798
diff --git a/games-action/orbital-eunuchs-sniper/files/1.29-ai.patch b/games-action/orbital-eunuchs-sniper/files/1.29-ai.patch
new file mode 100644
index 000000000000..b80260fc31a7
--- /dev/null
+++ b/games-action/orbital-eunuchs-sniper/files/1.29-ai.patch
@@ -0,0 +1,44 @@
+--- src/ai_orig.cpp 2003-03-17 17:22:17.000000000 +0100
++++ src/ai.cpp 2004-10-16 22:51:57.103455879 +0200
+@@ -479,7 +480,7 @@
+ int nolineofsight = 1;
+
+ // Do we have line of sight to the VIP?
+- if (route((int)c.mX, (int)c.mY, (int)Game.characters[c.mTarget].mX, (int)Game.characters[c.mTarget].mY))
++ if (c.mTarget != -1 && route((int)c.mX, (int)c.mY, (int)Game.characters[c.mTarget].mX, (int)Game.characters[c.mTarget].mY))
+ {
+ nolineofsight = 0;
+ // Calculate new vector to it
+@@ -541,7 +542,30 @@
+ {
+ // Find a new waypoint
+
+- if (nolineofsight)
++ if (c.mTarget == -1)
++ {
++ int oldWaypoint = c.mNextWaypoint;
++
++ // just choose the next-closest waypoint in the area (I know: we'll cycle).
++ c.mNextWaypoint = 0;
++ int i;
++ float dist = distance_wp(0, c.mX, c.mY);
++ for (i = 1; i < Game.num_waypoints; i++)
++ {
++ if (i != oldWaypoint) {
++ float newdist = distance_wp(i, c.mX, c.mY);
++ if (newdist < dist && route(Game.waypoints[i].mX, Game.waypoints[i].mY, (int)c.mX, (int)c.mY))
++ {
++ dist = newdist;
++ c.mNextWaypoint = i;
++ }
++ }
++ }
++ // Calculate vector towards the closest waypoint
++ c.mXi = ((Game.waypoints[c.mNextWaypoint].mX - c.mX) / dist) * c.mSpeed;
++ c.mYi = ((Game.waypoints[c.mNextWaypoint].mY - c.mY) / dist) * c.mSpeed;
++ }
++ else if (nolineofsight)
+ {
+ // Can't see the VIP, try to figure out the closest waypoint to target that's connected from here
+ int next = 0;
+
diff --git a/games-action/orbital-eunuchs-sniper/orbital-eunuchs-sniper-1.29.ebuild b/games-action/orbital-eunuchs-sniper/orbital-eunuchs-sniper-1.29.ebuild
index c2b46dd78afa..2e049c0c103f 100644
--- a/games-action/orbital-eunuchs-sniper/orbital-eunuchs-sniper-1.29.ebuild
+++ b/games-action/orbital-eunuchs-sniper/orbital-eunuchs-sniper-1.29.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/orbital-eunuchs-sniper/orbital-eunuchs-sniper-1.29.ebuild,v 1.8 2004/06/24 21:57:36 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/orbital-eunuchs-sniper/orbital-eunuchs-sniper-1.29.ebuild,v 1.9 2004/11/09 08:57:23 mr_bones_ Exp $
inherit eutils games
@@ -14,37 +14,36 @@ SLOT="0"
KEYWORDS="x86 ppc"
IUSE=""
-RDEPEND=">=media-libs/libsdl-1.2.5-r1
+DEPEND=">=media-libs/libsdl-1.2.5-r1
>=media-libs/sdl-mixer-1.2.5-r1
>=media-libs/sdl-image-1.2.2"
-DEPEND="${RDEPEND}
- >=sys-apps/sed-4"
-S=${WORKDIR}/${MY_PN}-${PV}
+S="${WORKDIR}/${MY_PN}-${PV}"
src_unpack() {
unpack ${A}
- cd ${S}
+ cd "${S}"
sed -i \
-e 's:datadir="$with_games_dir"::' configure \
|| die "sed configure failed"
- cp -rf ${S}{,.orig}
- epatch ${FILESDIR}/${PV}-gentoo-paths.patch
+ cp -rf "${S}"{,.orig}
+ epatch "${FILESDIR}/${PV}-gentoo-paths.patch"
sed -i \
-e "s:GENTOO_DIR:${GAMES_DATADIR}/${MY_PN}:" src/snipe2d.cpp \
|| die "sed src/snipe2d.cpp failed"
+ epatch "${FILESDIR}/${PV}-ai.patch"
}
src_compile() {
- egamesconf --with-games-dir=${GAMES_PREFIX} || die
+ egamesconf --with-games-dir="${GAMES_PREFIX}" || die
emake || die "emake failed"
}
src_install() {
- make DESTDIR=${D} install || die "make install failed"
- rm -f ${D}/${GAMES_BINDIR}/*
- dodir ${GAMES_LIBDIR}/${PN}
- mv ${D}/${GAMES_DATADIR}/${MY_PN}/snipe2d.* ${D}/${GAMES_LIBDIR}/${PN}/ \
+ make DESTDIR="${D}" install || die "make install failed"
+ rm -f "${D}/${GAMES_BINDIR}/"*
+ dodir "${GAMES_LIBDIR}/${PN}"
+ mv "${D}/${GAMES_DATADIR}/${MY_PN}/"snipe2d.* "${D}/${GAMES_LIBDIR}/${PN}/" \
|| die "mv failed"
games_make_wrapper snipe2d ./snipe2d.x86.dynamic "${GAMES_LIBDIR}/${PN}"