From 7d1a881d7ef9b15682eea550244f8ad0d5645eb7 Mon Sep 17 00:00:00 2001 From: driAn Date: Wed, 27 Aug 2008 18:50:23 +0000 Subject: [PATCH] fixed sub selection issue git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2416 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/weapon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index bb290054..ad36ebb0 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -84,9 +84,9 @@ void shiftweapon(int s) if(!num || curidx<0) return; int idx = (curidx+s) % num; if(idx<0) idx += num; - if(idx!=player1->weaponsel->type) // different weapon + weapon *next = availweapons[idx]; + if(next->type!=player1->weaponsel->type) // different weapon { - weapon *next = availweapons[idx]; selectweapon(next); } }