1

Topic: remember last hooked player

Hi everyone,

i'm playing around with the teeworlds source a little bit and i want that a tee remembers the last tee that hooked him.

But i can't find out how to do this.

I saw in gamecore.cpp, that there is a variable that represents, the current hooked player, but i don't know how to tell the tee itself that it got hooked and whos the player which hooked him.

Best Regards

2

Re: remember last hooked player

in character.cpp m_Core.m_HookedPlayer is the player which the character is currently hooking.
when it's -1 it indicates that you're hooking noone.
If you want to find out who's hooking you, you need to loop through all characters and check wether the m_HookedPlayer is equal your client id.

3

Re: remember last hooked player

Hi BotoX, is there a way, without modifying the gamecore?

4

Re: remember last hooked player

you can easyly access the variable in the character without modifying the gamecore.

like Botox already said:

m_Core.m_HookedPlayer
uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

5

Re: remember last hooked player

Oh, you're right. I don't know, how I haven't seen this.

I'll try it when i come home.

Thanks, guys.