mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add radial triggers
This commit is contained in:
parent
e6c3775286
commit
736e5b95b6
9 changed files with 117 additions and 44 deletions
|
|
@ -320,10 +320,12 @@ void ContentLoader::loadEntity(EntityDef& def, const std::string& name, const fs
|
|||
if (auto triggerarr = triggersarr->list(i)) {
|
||||
auto triggerType = triggerarr->str(0);
|
||||
if (triggerType == "aabb") {
|
||||
def.boxTriggers.push_back({
|
||||
def.boxTriggers.push_back({i, {
|
||||
{triggerarr->num(1), triggerarr->num(2), triggerarr->num(3)},
|
||||
{triggerarr->num(4), triggerarr->num(5), triggerarr->num(6)}
|
||||
});
|
||||
}});
|
||||
} else if (triggerType == "radius") {
|
||||
def.radialTriggers.push_back({i, triggerarr->num(1)});
|
||||
} else {
|
||||
logger.error() << name << ": trigger #" << i << " - unknown type "
|
||||
<< util::quote(triggerType);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue