Get rid of some unnecessary float<->int casts + some new Lua functions:

- filterNearestEntitiesAdd()
- getEntityToActivate()
- setEntityToActivate()
- hasThingToActivate()