From fafd13894e4bf494a93920828ed0ab0ce756af13 Mon Sep 17 00:00:00 2001 From: Bukz Date: Sat, 23 Apr 2011 14:06:18 +0000 Subject: [PATCH] onReload git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6308 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/weapon.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 12524030..2e6bfa57 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -764,7 +764,11 @@ bool weapon::reload() bool local = (player1 == owner); if(owner->type==ENT_BOT) audiomgr.playsound(info.reload, owner); else audiomgr.playsoundc(info.reload, NULL, local ? SP_HIGH : SP_NORMAL); - if(local) addmsg(SV_RELOAD, "ri2", lastmillis, owner->weaponsel->type); + if(local) + { + addmsg(SV_RELOAD, "ri2", lastmillis, owner->weaponsel->type); + if(identexists("onReload")) execute("onReload"); + } return true; }