From: <and...@mc...> - 2002-07-01 21:20:03
|
Kevin, the default createBullet() has --AmmoAmmount in it. Unless you rewrote that function in SpreadGun, it suffers all the same. (it does fire 4 bursts of 3 bullets before reloading, where the default clipsize is 12) But I like your solution better than mine anyway... I'll see if I can fix that sometime, or you can go ahead and do what you like. > > isn't createBullet just a factory function? It shouldn't really decrement > the bullet count should it? I would think that the function that uses > createBullet (update I think) would decrement the count. > > maybe I'm not remembering the code though... This would solve the problem > though... look at the spread gun, it is giong to be very similar, and > doesn't suffer from the problem you describe. (i.e. 3 always come out, but > are treated as one bullet). > > *--*---*---*----*-----*------*------*-----*----*---*---*--* > Kevin Meinert /_/ > http://www.vrac.iastate.edu/~kevn \ / > Virtual Reality Applications Center \/ __ \/ > Howe Hall, Iowa State University, Ames Iowa \__ > \_\ > > On Mon, 1 Jul 2002, Andres Reinot wrote: > > > areinot 2002/07/01 13:20:17 PDT > > > > Modified files: > > src BaseProjectileWeapon.h GameState.cpp > > Log: > > New feature: Shotgun. NOTE: I moved BaseWeaponObject's reload() to be > > protected so that the shotgun could define it's own createBullet function. > > the problem is that the Shotgun shoots 10 pellets, which should decrement > > the ammo by only 1 bullet. Any better ideas that don't mess with > > BaseWeapon are welcome. > > > > Revision Changes Path > > 1.2 +2 -1 midworld/src/BaseProjectileWeapon.h > > 1.8 +2 -0 midworld/src/GameState.cpp > > > > > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/midworld/src/BaseProje > ctileWeapon.h.diff?r1=1.1&r2=1.2&diff_format=h > > > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/isugamedev/midworld/src/GameState > .cpp.diff?r1=1.7&r2=1.8&diff_format=h > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > ISUGameDev-commits mailing list > > ISU...@li... > > https://lists.sourceforge.net/lists/listinfo/isugamedev-commits > > > |