Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Detecting Mines

 
Post new topic   Reply to topic Printable version
 View previous topic  Periodic.c Post :: Post Creating Fake Turrets  View next topic  
Author Message
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Wed Feb 11, 2009 1:04 pm    Post subject: Detecting Mines Reply to topic Reply with quote

How do I detect laid mines? (preferably in python)

Also, is there a way to detect if a mine has gone off?
Back to top
View users profile Send private message Add User to Ignore List AIM Address
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Wed Feb 11, 2009 3:46 pm    Post subject: Reply to topic Reply with quote

Mines are sent with the weapon fired information of a position packet. You'll want to have a callback for C2S_POSITION using net->AddPacket. Then you would need to check the pkt->weapon->type for being W_BOMB or W_PROXBOMB and pkt->weapon->alternate for being 1.

The only way I know for sure to detect if a mine has gone off would be to turn on watchdamage for everyone, which is in general not a good idea. A less reliable method would be to keep track of where all mines have been laid and see if any player comes close to them. You would obviously then have to monitor for players going into safes, changing ships, etc for that as well.
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Feb 11, 2009 9:46 pm    Post subject: Reply to topic Reply with quote

Mine alive time expiring too

Could it be possible to turn on watchdamage temporarily for people who come within X pixels of the mine, and turning it off again if they go away?

That could give you the "accuracy" of the watchdamage, without the massive server lag for watching everyone.
The only thing you need to keep track of is changing ship, going in safety and mine alive time.
Oh, and enemy repels

Also, if you have wormholes and if they affect bombs, a mine will instantly turn into a bomb if laid close to it, so you'd have to check for that too.
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Feb 12, 2009 9:18 am    Post subject: Reply to topic Reply with quote

watchdamage isn't quite enough to detect a unique mine hit anyway. For example, if someone laid a bunch of prox mines close together, and a player hit just one... which one did he hit? You'd still need to do some position and prox checking.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
JoWie
Server Help Squatter


Gender:Gender:Male
Joined: Feb 25 2004
Posts: 215
Offline

PostPosted: Thu Feb 12, 2009 11:51 am    Post subject: Reply to topic Reply with quote

You would also need to factor in lag. A player could have hit the mine on one one screen, but not on another.
Back to top
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Thu Feb 12, 2009 12:36 pm    Post subject: Reply to topic Reply with quote

Dr Brain wrote:
watchdamage isn't quite enough to detect a unique mine hit anyway. For example, if someone laid a bunch of prox mines close together, and a player hit just one... which one did he hit? You'd still need to do some position and prox checking.
Well, you could do the prox checking 'after' the hit though. Player gets hit by a mine, check where he is, scroll through the list of known mines and check which one is more likely to have blown up

But yeah, because of lag, everything gets tricky, because the same mine could hit/kill more than one player at different times, as JoWiE said.
So you'd still have to keep mines that you consider as 'blown up' in the list until they expire (safety, alive time, ship change) and conclude they were blown up a second time if someone in the area blows up because of a mine by the same person and there were not any other mines laid near...

Yeah it gets pretty tricky :S
Back to top
View users profile Send private message Add User to Ignore List
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Thu Feb 12, 2009 3:59 pm    Post subject: Reply to topic Reply with quote

What you might want to do, if mines are a 1 hit-kill is have a command (or if you wanted to get really fancy, use brick drops) to lay a "mine" which would be a region with an lvz image on the map. Then if a player entered that region you could use a fake player, say <mine>, that you use to kill that person off and then give +1 on the kill stat to whoever laid the mine. You could even get into things like, if they have above a certain energy level you just prize them an energy depleted, otherwise you go on with the killing bit.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Feb 12, 2009 6:49 pm    Post subject: Reply to topic Reply with quote

D1st0rt wrote:
What you might want to do, if mines are a 1 hit-kill is have a command (or if you wanted to get really fancy, use brick drops) to lay a "mine" which would be a region with an lvz image on the map. Then if a player entered that region you could use a fake player, say <mine>, that you use to kill that person off and then give +1 on the kill stat to whoever laid the mine. You could even get into things like, if they have above a certain energy level you just prize them an energy depleted, otherwise you go on with the killing bit.


Even simpler, you can hijack the player that laid the mine for the kill, rather than dealing with a fake.

But yes, a server side solution will be much easier to implement, though it can be a bit limiting.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Thu Feb 12, 2009 8:26 pm    Post subject: Reply to topic Reply with quote

That was my first impulse but I didn't want that player to potentially jump around from the spoofed position. I suppose if that player is the only one you're sending it to and he's dying anyway it doesn't much matter though.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Sun Feb 15, 2009 1:13 pm    Post subject: Reply to topic Reply with quote

I dont really _need_ to detect mines going off. I just wanted to prevent abuse (making the fake absorb some bullets/bombs).

Thanks for your help. Now read my other post on fake turrets please icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 106 page(s) served in previous 5 minutes.

phpBB Created this page in 0.564049 seconds : 34 queries executed (84.7%): GZIP compression disabled