Posts: 59
Threads: 21
Joined: Dec 2012
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
I have no clue,
/offtopic
Are you the new forum spammer?
Posts: 582
Threads: 11
Joined: Aug 2011
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
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: 3,462
Threads: 72
Joined: Jun 2010
Posts: 59
Threads: 21
Joined: Dec 2012
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: 1,331
Threads: 44
Joined: Jun 2010
Use a program like
AstroGrep to search all of the source code files for that line of code, you'll get something.
Posts: 189
Threads: 7
Joined: Feb 2012
Try asking all your questions in one thread.
Posts: 3,462
Threads: 72
Joined: Jun 2010
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: 172
Threads: 5
Joined: Jun 2010
(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.
Posts: 799
Threads: 52
Joined: Jan 2011
dokill(victim, actor, gib, gun) is in clientgame.cpp.
Posts: 591
Threads: 19
Joined: Jun 2010
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 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 = )