Target Nearest Player
Forum rules
This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.
Its current use is for the continued development of the server and game it has always served: TMW Classic.
Target Nearest Player
QOAL made the button, I reworked it to use the 0.0.24 controls. Default button is 'q', but that can be changed from the keyboard setup dialog.
Put simply, this button allows you to automatically target other players. Useful for the arena, completely useless everywhere else. No more clicking around like mad trying to get a lock on a player who keeps running in a circle like a dork.
Patch files can be found here.
EDIT: Suppose I should explain what the changes in each file do
keyboardconfig.cpp: Defines the button
keyboardconfig.h: Lists the button in enum keyaction
game.cpp: Defines a use for the key.
beingmanager.cpp: Adds a 1 tile deadzone so you don't target yourself with the button.
Put simply, this button allows you to automatically target other players. Useful for the arena, completely useless everywhere else. No more clicking around like mad trying to get a lock on a player who keeps running in a circle like a dork.
Patch files can be found here.
EDIT: Suppose I should explain what the changes in each file do
keyboardconfig.cpp: Defines the button
keyboardconfig.h: Lists the button in enum keyaction
game.cpp: Defines a use for the key.
beingmanager.cpp: Adds a 1 tile deadzone so you don't target yourself with the button.
-
- Novice
- Posts: 221
- Joined: 20 Oct 2006, 16:44
Just a note about the 'deadzone' that was added, although there isn't much of problem using that method, it would be better if instead of having a 'deadzone' it checked that the being id wasn't the same as the players.
But I couldn't figure that out.
(It also used to work fine without having to add a deadzone.)
But I couldn't figure that out.
(It also used to work fine without having to add a deadzone.)
It didn't work at all without dead zone (this is a new feature). ID checking is better because deadzone doesn't work correctly if you are on the same tile as the nearest player.Quiche_on_a_leash wrote:Just a note about the 'deadzone' that was added, although there isn't much of problem using that method, it would be better if instead of having a 'deadzone' it checked that the being id wasn't the same as the players.
But I couldn't figure that out.
(It also used to work fine without having to add a deadzone.)
Thanks for the patches. I applied them with a small modification. I solved the self-targeting problem by adding another overloaded Version of BeingManager::findNearestLivingBeing that takes a pointer to a being instead of coordinates and excludes the provided being from the result. Excluding a target that is exactly on the provided coordinates might cause unexpected behavior somewhere else.
- former Manasource Programmer
- former TMW Pixel artist
- NOT a game master
Please do not send me any inquiries regarding player accounts on TMW.
You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Re: Target Nearest Player
where can I get this patch? the link is dead
Landon
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
- Sertraline
- Novice
- Posts: 128
- Joined: 02 Dec 2007, 03:29
- Location: Austin, TX, USA
Re: Target Nearest Player
I believe it's in the latest subversion client.