code that detects kill
#1
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.
Thanks given by:
#2
I have no clue,


/offtopic
Are you the new forum spammer?
Thanks given by:
#3
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)
Thanks given by:
#4
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.
Thanks given by:
#5
This is in SVN.
Thanks given by:
#6
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.
Thanks given by:
#7
Use a program like AstroGrep to search all of the source code files for that line of code, you'll get something.
Thanks given by:
#8
Try asking all your questions in one thread.
Thanks given by:
#9
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".
Thanks given by:
#10
(30 Jan 13, 11:50PM)Artemis Wrote: Try asking all your questions in one thread.

No.

Also, Lee, maybe put these threads in the 'mapping/modding' forum.
Thanks given by:
#11
dokill(victim, actor, gib, gun) is in clientgame.cpp.
Thanks given by:
#12
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.
Thanks given by:
#13
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 = )
Thanks given by: