diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-08-27 20:51:51 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-08-27 20:51:51 +0000 |
| commit | b22dd1488cdae53d27215fda051fea9bfc72ac1d (patch) | |
| tree | b1095afdbca496995fc716cdfb25a55bc3933f21 /src/game/client/gc_hooks.cpp | |
| parent | a47fe88d196735a52809a1387ed67aa1a767bd4f (diff) | |
| download | zcatch-b22dd1488cdae53d27215fda051fea9bfc72ac1d.tar.gz zcatch-b22dd1488cdae53d27215fda051fea9bfc72ac1d.zip | |
futher cleanups
Diffstat (limited to 'src/game/client/gc_hooks.cpp')
| -rw-r--r-- | src/game/client/gc_hooks.cpp | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/src/game/client/gc_hooks.cpp b/src/game/client/gc_hooks.cpp index df808a67..11c2cc85 100644 --- a/src/game/client/gc_hooks.cpp +++ b/src/game/client/gc_hooks.cpp @@ -187,132 +187,6 @@ extern "C" void modc_message(int msgtype) } gameclient.on_message(msgtype); - -#if 0 - // normal - void *rawmsg = netmsg_secure_unpack(msgtype); - if(!rawmsg) - { - dbg_msg("client", "dropped weird message '%s' (%d), failed on '%s'", netmsg_get_name(msgtype), msgtype, netmsg_failed_on()); - return; - } - - - if(msgtype == NETMSGTYPE_SV_CHAT) - { - - } - else if(msgtype == NETMSGTYPE_SV_BROADCAST) - { - /* - NETMSG_SV_BROADCAST *msg = (NETMSG_SV_BROADCAST *)rawmsg; - str_copy(broadcast_text, msg->message, sizeof(broadcast_text)); - broadcast_time = time_get()+time_freq()*10; - */ - } - else if(msgtype == NETMSGTYPE_SV_MOTD) - { - /* - NETMSG_SV_MOTD *msg = (NETMSG_SV_MOTD *)rawmsg; - - // process escaping - str_copy(server_motd, msg->message, sizeof(server_motd)); - for(int i = 0; server_motd[i]; i++) - { - if(server_motd[i] == '\\') - { - if(server_motd[i+1] == 'n') - { - server_motd[i] = ' '; - server_motd[i+1] = '\n'; - i++; - } - } - } - - if(server_motd[0] && config.cl_motd_time) - server_motd_time = time_get()+time_freq()*config.cl_motd_time; - else - server_motd_time = 0; - */ - } - else if(msgtype == NETMSGTYPE_SV_SETINFO) - { - dbg_msg("DEBUG", "got info"); - NETMSG_SV_SETINFO *msg = (NETMSG_SV_SETINFO *)rawmsg; - - str_copy(gameclient.clients[msg->cid].name, msg->name, 64); - str_copy(gameclient.clients[msg->cid].skin_name, msg->skin, 64); - - // make sure that we don't set a special skin on the client - if(gameclient.clients[msg->cid].skin_name[0] == 'x' || gameclient.clients[msg->cid].skin_name[1] == '_') - str_copy(gameclient.clients[msg->cid].skin_name, "default", 64); - - gameclient.clients[msg->cid].skin_info.color_body = gameclient.skins->get_color(msg->color_body); - gameclient.clients[msg->cid].skin_info.color_feet = gameclient.skins->get_color(msg->color_feet); - gameclient.clients[msg->cid].skin_info.size = 64; - - // find new skin - gameclient.clients[msg->cid].skin_id = gameclient.skins->find(gameclient.clients[msg->cid].skin_name); - if(gameclient.clients[msg->cid].skin_id < 0) - gameclient.clients[msg->cid].skin_id = 0; - - if(msg->use_custom_color) - gameclient.clients[msg->cid].skin_info.texture = gameclient.skins->get(gameclient.clients[msg->cid].skin_id)->color_texture; - else - { - gameclient.clients[msg->cid].skin_info.texture = gameclient.skins->get(gameclient.clients[msg->cid].skin_id)->org_texture; - gameclient.clients[msg->cid].skin_info.color_body = vec4(1,1,1,1); - gameclient.clients[msg->cid].skin_info.color_feet = vec4(1,1,1,1); - } - - gameclient.clients[msg->cid].update_render_info(); - } - else if(msgtype == NETMSGTYPE_SV_WEAPONPICKUP) - { - // TODO: repair me - /*NETMSG_SV_WEAPONPICKUP *msg = (NETMSG_SV_WEAPONPICKUP *)rawmsg; - if(config.cl_autoswitch_weapons) - input_data.wanted_weapon = msg->weapon+1;*/ - } - else if(msgtype == NETMSGTYPE_SV_READYTOENTER) - { - client_entergame(); - } - else if(msgtype == NETMSGTYPE_SV_KILLMSG) - { - /* - NETMSG_SV_KILLMSG *msg = (NETMSG_SV_KILLMSG *)rawmsg; - - gameclient.killmsgs.handle_message((NETMSG_SV_KILLMSG *)rawmsg); - - // unpack messages - KILLMSG kill; - kill.killer = msg->killer; - kill.victim = msg->victim; - kill.weapon = msg->weapon; - kill.mode_special = msg->mode_special; - kill.tick = client_tick(); - - // add the message - killmsg_current = (killmsg_current+1)%killmsg_max; - killmsgs[killmsg_current] = kill;*/ - } - else if (msgtype == NETMSGTYPE_SV_EMOTICON) - { - NETMSG_SV_EMOTICON *msg = (NETMSG_SV_EMOTICON *)rawmsg; - - // apply - gameclient.clients[msg->cid].emoticon = msg->emoticon; - gameclient.clients[msg->cid].emoticon_start = client_tick(); - } - else if(msgtype == NETMSGTYPE_SV_SOUNDGLOBAL) - { - NETMSG_SV_SOUNDGLOBAL *msg = (NETMSG_SV_SOUNDGLOBAL *)rawmsg; - snd_play_random(CHN_GLOBAL, msg->soundid, 1.0f, vec2(0,0)); - } - -#endif } extern "C" void modc_connected() |