Jump to content
RenCorner Network

Automatic b2b checking code idea


Recommended Posts

Posted (edited)

Every frame check every player data->ShotsFired. Register a list for every player om what frame he fired, what weapon and his location. Check building damage. Check the list of shots fired and compared the distance between the fired at location and building location and compare it with weapon projectile speed to check if it can be shot at that specific frame (have some wiggle room). Then add b2b zones check if the fired at location was in zone or not.

The list needs to be maintained for about 30 seconds (30*60 frames). One optimization is only checking for weapons that can b2b and fired at location in a b2b zone potential zone.

Issue is figuring out the projectile speed and how it compares to distance between fired at location and building location.

 

You can also just check the player location when he damages the building but then he can just change his position after shooting so it doesnt register as b2b anymore in some instances like on Islands.

Bullet velocity is AmmoDefinitionClass->Velocity, just gotta figure how that is measured against distance & frames.

Edited by Iran
Posted
On 10/21/2020 at 9:52 AM, Iran said:

You can also just check the player location when he damages the building but then he can just change his position after shooting so it doesnt register as b2b anymore in some instances like on Islands.

Probably this is enough. Just to alert mods, not to auto kick by itself.

I think it's very hard to b2b more than one artillery shell or one mrls missile salvo without triggering the alarm. If the b2b-er wants more than that, he has to move back and forth and time it very carefully, and need to know exactly where the zone is, and being very close to the edge of it. Easier to just move a few more meters  to not b2b/

Posted
On 10/21/2020 at 7:52 AM, Iran said:

You can also just check the player location when he damages the building but then he can just change his position after shooting so it doesnt register as b2b anymore in some instances like on Islands.

Bullet velocity is AmmoDefinitionClass->Velocity, just gotta figure how that is measured against distance & frames.

 

Just been doing this the with custom zones but noticed this can be an issue. Why worry about projectile speed just check last fired position and call it a day?

Posted

Cause we dont know which projectile hit, if a player has mrls on river and he shoots on river then shoots past river you dont know which projectiles hit, might have been the one on river or the ones past river, if you know the timing you can guess very accurately

 

Posted

Renelag & Positions... lol 

I sometimes even lag into objects like a box etc. wich is impossible, even with 30 ping.

  • 1 month later...
Posted

Use a map where custom objects are placed in the way to prevent this.

Anyone hear of a map called C&C Deth Islands?

It was a version of Islands were a large billboard (similar to the one in City) was placed above the waterway between the bases preventing GDI from base to base attacks from the Barracks.

I mean you can write all the coding you want, but just slap a sign in the way, and call it a day. Hell, I'd have fun with it. I 'd write something shitty on there like, "Eff off base-to-base n00bs".

I myself can't be too harsh on what's written, because I used to b2b on that map waaaaaay back when. Such a great game!

Posted

Well just adding some code is about just as easy, you just drop a script zone in leveledit and then copy the coordinates into a INI which the code reads

Posted

Well it's there choice. Islands already has the fix if they wanted to use that version.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...