Sign in to follow this  
Followers 0
MrDynamite

Deleteing Vehicles, vehicleLifeTime = 3;

7 posts in this topic

Hi,

vehicles getting deleted after 3 days ... well thats a tough default. :-)

I think this should apply only to vehicles outside a territory. Inside the vehicles should last as long as the base exists.

Right now cars and helis get deleted everywhere.

MrD

 

Share this post


Link to post
Share on other sites
Advertisement

That has yet to be solved/fixed. It's a problem with how Exile spawns in vehicles and they usually blow up on wood floors, in bases too close to walls, or near fireplaces :(

Share this post


Link to post
Share on other sites

Hi,

I have no idea about modding with Arma3 and what is behind the scene.

But from outside I could imagine that this distance staff with vehicle and items can be complicated.

 

But I was just thinking about adding another check to the date.

You are checking the list of cars vs 3 days last action of movement / entering / locking ...

Check the distance of the car to the next territory flag: < territory radius -> OK , > teritory radius -> delete.

Or a even simpler but less transparent / presice check: if in max territory radius around the car there exists a flag -> car stays.

About the unkown cars in my territory ... I take care .... *BOOOM*

I've omitted car owner vs territory owner so friends can log out on my territory.

Cars are not inexpensive in these days ....

MrD

Share this post


Link to post
Share on other sites

Posted (edited)

Hi,

maybe these are the cars i would _not_ remove even above 3 days :-)

The querry works, results are not verified.

select distinct v1.id # *
from
(
select id, 'j' as joinit, position_x, position_y, last_updated_at
from vehicle
where DATEDIFF(now(),last_updated_at) > 3
) as v1

left outer join

(
select id, 'j' as joinit, position_x, position_y, radius
from territory
) as t1

on v1.joinit = t1.joinit

where (v1.position_x-t1.position_x)*(v1.position_x-t1.position_x) < radius*radius
and (v1.position_y-t1.position_y)*(v1.position_y-t1.position_y) < radius*radius

MrD

Edited by MrDynamite

Share this post


Link to post
Share on other sites

Hi,

 

this is now more technical related but I put it here since it started here.

extdb, exile.ini, at the bottom garbage collector

; Removes vehicles that were not used within ? days
[deleteOldVehicles]
SQL1_1 = DELETE FROM vehicle WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY)
Number Of Inputs = 1
SQL1_INPUTS = 1

Is this the only location where I have to modify the sql statement for car deletion?

When I find some time I only need to invert my querry to get the cars to delete and put it in this spot and test it.

MrD

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.