Posts: 59
Threads: 21
Joined: Dec 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
I'm looking for the code that detects if a kill was made by the player in the source. I'm having trouble finding it. I wish the code had some comments beside some of the functions. I think it might be in clientgame.cpp but not really sure. Still learning the more advanced stuff in c++...
Thanks in advance.
Posts: 2,230
Threads: 32
Joined: Jun 2011
Thanks: 170
Given 333 thank(s) in 189 post(s)
I have no clue,
/offtopic
Are you the new forum spammer?
Posts: 582
Threads: 11
Joined: Aug 2011
Thanks: 0
Given 0 thank(s) in 0 post(s)
Forum are for people who want to say something or ask questions. Maybe he has a lot of questions :p
I dont know either bw (this is spam lol)
Posts: 1,331
Threads: 44
Joined: Jun 2010
Thanks: 13
Given 10 thank(s) in 8 post(s)
The cubescript alias 'onKill' is automatically executed whenever a client dies. Try grep'ing the source for "if(identexists("onKill"))" and you should be able to work something out from there.
Posts: 59
Threads: 21
Joined: Dec 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
I opened up the source in vs 2010 and hit ctrl+F, typed what you gave me Bukz and also tried onKill by itself but it didn't find anything.
Posts: 189
Threads: 7
Joined: Feb 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
Try asking all your questions in one thread.
Posts: 3,462
Threads: 72
Joined: Jun 2010
Thanks: 5
Given 3 thank(s) in 3 post(s)
I think this might be in a function called doKill, doDamage, or something like that. Make sure you select an option like "search all files".
Posts: 799
Threads: 52
Joined: Jan 2011
Thanks: 1
Given 36 thank(s) in 15 post(s)
dokill(victim, actor, gib, gun) is in clientgame.cpp.
Posts: 591
Threads: 19
Joined: Jun 2010
Thanks: 3
Given 12 thank(s) in 7 post(s)
Generally the event should be invoked if the distance is shorter than some constant. The constant is fixed "magical" number (position1 + position2 < constant) because the computing of real distance would be slowed the game. If it is in AC implemented other way, pls post it.
Posts: 59
Threads: 21
Joined: Dec 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
Thanks for the patience guys, I just got back to C++ and I don't have a really solid understanding of the advanced stuff in C++, so please bear with me while I ask stupid questions.
I just want to create some mods for assaultcube using my favorite language = )