Hello ! Sorry for the inertia !
I was actually quite panicked when I posted this message, as I just finished that big part of my game about the level generation I couldn't plan calmly what I was going to do.
So 3 weeks later, I made some progress on that subject. The parametric weapon is basically implemented. I've let down the heat management for the moment. The inventory system is working but the UI of it is not ready.
UglyFoot wrote:Perhaps there is no need to add variables as they will be items and if I remember correctly they are stored in inventory (playerState_t).
Using existing variables in playerstate means recycling the stats[], persistant[], powerups[] and ammo[] arrays, which might have been fine but I prefer building my own systems whithout damaging or deleting the existing ones ... So I added stuff to the playerstate :
- The weapon's parameters (float precision, float power, int bullets, float reloadtime, and float heat)
- The weapon's installed item slots (array of 6 ints)
- The player's inventory (array of 16 ints)
I had to modify qcommon/msg.c to get this data across the network, and it seams to work ! I struggled a lot during the past 48 hours and the final implementation isn't very good looking but it works
UglyFoot wrote:As for changing the MG, check out FireWeapon, inside it there is a call to a function for each weapon, I would copy and edit Butllet_Fire.
Yup, so what I did was to add a new weapon and make it the default spawning weapon for the player. Then I plugged a custom 'fire' function that uses the machinegun's 'bullet_fire' function. When there are multiple bullets to be fired, I just use this function multiple times. I haven't stress-tested that yet, but since the shotgun is coded quite differently for network reasons, I could have problems in the future.
UglyFoot wrote:By the way, what contest is it?
It's a french contest taking place for the "TGS" (which means Toulouse game Show, not Tokyo game show). There is Frédéric Raynal among the Judges !
I made some nice progress today, but I'm already stuck on a new thing : I added a function that drops items from the inventory, and it seems to work fine server side, but client side the dropped item seems not synchronized, or actually it is sometime synchronized the first time, but the next drops are invisible and there is no sound / feedback icon when I pick them up (but they do get picked up server-side, I can tell from my G_Printfs inside my pickup function).
Have you or someone used a lot the "drop_item" functions ? Right now I'm clueless

[url=http://www.dmitri-engman.fr/]My blog[/url] - [url=http://dmeat.free.fr/book/]My portfolio[/url]
---------------------
[url=http://lvlworld.com/#c=m1&i=1908&d=12%20Dec%202012&m=All&p=review]MJDM2[/url] - [url=http://lvlworld.com/#c=m1&i=2108&d=12%20Dec%202012&m=All&p=review]DmeatSP01[/url] - [url=http://lvlworld.com/#c=m1&i=2132&d=12%20Dec%202012&m=All&p=review]DmeatSP02[/url]