Closed FloooD closed 13 years ago
:D, btw when you have time check out the pull request, I rewrote the send into a queue.
k forget about slots. since each weapon may go into only one slot the current system redundant (and messy). gonna replace player[p_id].slot with player[p_id].wpntable actualweapon will be the id of the weapon the player is holding
struct PLAYER_WEAPON { short status; //0 - don't have, 1 - normal, 2 - zoom1/burst, 3 - zoom2 short ammo1, ammo2; }
struct PLAYER { //blablabla struct PLAYER_WEAPON wpntable[0xff] //blablabla }
gah this "github flavored markdown" is annoying. cant they just do plain text
o_O just add 4 spaces before everything (using tab in eclipse, copy, and then shit+tab to restore)
shit+tab? lol lemme try
cool lol
TT, typos happen okay? too bad there isn't a syntax checker for real life <<
rofl... so apparently slot in jermuk's code has no relation to the weapon slot in the client-.-
oh well my system is still simpler. Well I guess it uses more mory but less for-loops :p
btw I won't be able to work on the server today or tomorrow, we have a 24 hour hackathon thing
ok lol havefun :p
ahhh, knife now has 0 ammo unless you buy a weapon and then buy ammo (which is automatic for weapon buy), quite funny when I tried to demo the server to a few friends so, we were like huh? pulled up the log, and then were like ohhh
rofl haha uh i think it's something in the start weapons
like it doesn't know that u have a knife by default hence 0 ammo :P
anyway ill figure out most of these problems when i start working on the standard gamemode. for now... time to redo hit system ;p
a lil bit of linear algebra should suffice, I wonder how Jermuk did it. Btw, I'll write a quad tree for amortized log-time lookup of the map entities and tiles.
eh... i rly dont think a quad tree would be necessary. i mean our maps aren't 10000x10000 right?
jermuk's method is pretty ugly... and i think it's what is used by dc as well. look at the onfire function ew @ big for loop
im basically gonna port https://gist.github.com/854210 to c
but first, physics homework :D
eh closed
the current player/weapon system is incredibly confusing...
first, player[p_id].actualweapon refers to the the slot of the weapon the player is using so... getting the name of that weapon means... weapons[player[p_id].slot[player[p_id].actualweapon].id].name
ew... from what i can tell, if you have two weapons in one slot, the server can only figure out the name/id of one of those weapons...
which makes me wonder how the hell weapon switching works
i think i'll redo the entire weapon/player structs