Topic: JB's Questions
Alright I decided that anytime I have a question about the coding I would just post it in here, that way I didn't have like 20 topics of different questions...
QUESTION 1
---------------------------------------------------------------------------------------------------------------
to start it off, could someone please explain to me what this coding is? like break it down for me? I am Really fascinated with programming and this is the perfect opportunity to learn (hopefully). As a 15 year old kid in a high school, with no programming classes at all, I'm hoping to learn every little bit I can from other places.
(from gs_server.cpp)
case WEAPON_GUN:
{
new projectile(WEAPON_GUN,
client_id,
pos+vec2(0,0),
direction*30.0f,
100,
this,
1, 0, 0, -1, WEAPON_GUN);
create_sound(pos, SOUND_GUN_FIRE);
break;
}
I know (hopefully) that this is telling it whats going on with the shot from a gun (the original gun).
what I THINK I know:
it's going for 30f's (?feet?) forward.
what does the rest of it mean? like "pos+vec2(0,0)," and "1, 0, 0, -1, WEAPON_GUN);"
---------------------------------------------------------------------------------------------------------------
QUESTION 2
---------------------------------------------------------------------------------------------------------------
after reading peoro's post about modding a server, he talked about 3 files,
src/game/server/gs_game.cpp
src/game/g_protocol.h
src/game/server/gs_server.cpp
what are these 3 files used for?
---------------------------------------------------------------------------------------------------------------
thanks for any help anyone provides.
also if I am doing anything illegal or something let me know and I will immediately stop.