![]() |
VR-Forces Developer's Guide
|
The way weapon systems interact with each other and how they are tasked has changed in VRF 5.1. In VRF 5.1, all weapon systems are directly taskable with their own custom tasks, and there is no longer a central "Target Selection Controller" that controls weapons. The following controllers and related classes have been removed:
There is a new unidirectional communication mechanism called "WeaponInfo" that exists for looking up information about mounted weapons on an entity. This is part of the internal state of the entity and is available only to other components on the same entity. This is accessed through DtVrfObjectStateRepository::weaponInfoList(). Weapon information on this list is accessed using the DtWeaponInfoInterface class. There is also a Lua equivalent for this information.
The "weapon interface" system for interacting with a mounted weapon is no longer used, although the DtBaseWeaponComponentInterface class and subclasses still exist for use as a PSR by the weapon system itself.
The management of tick times for the DtSimComponent has changed. This API is mainly used for internal VR-Forces logic, so it is unlikely that custom plugins use this API, but may access in some cases. The following functions and members have been removed from DtSimComponent:
They have been replaced by the DtTimedTickLogic class and its subclasses. DtSimComponent has a new member that is a pointer to a subclass of DtTimedTickLogic, which manages the state and data for the tick period of the component. Depending on the configuration of the component, it will have a different subclass of DtTimedTickLogic. Most components are configured to tick every frame and will have the DtAlwaysTickLogic logic which has no data members. Others that are configured to only tick periodically will have either DtSimTimeOnlyTickLogic or its subclass DtSimTimeAndRealTimeWhenPausedTickLogic. If your DtSimComponent subclass needs to access the tick period data, it can dynamic_cast the DtTimedTickLogic to get at the data members if they are present, as in this example:
[Home]