mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Create path only if the target is a SplinePath
This commit is contained in:
parent
54b9a0c340
commit
9d83d58756
1 changed files with 3 additions and 1 deletions
|
@ -604,9 +604,11 @@ void SplinePath::CreatePath(Event *ev)
|
|||
target = Target();
|
||||
if (target[0]) {
|
||||
ent = (Entity *)G_FindTarget(NULL, target);
|
||||
if (ent) {
|
||||
if (ent && ent->IsSubclassOfSplinePath()) {
|
||||
next = (SplinePath *)ent;
|
||||
next->owner = this;
|
||||
} else if (ent) {
|
||||
ScriptError("SplinePath::CreatePath: target '%s' for '%s' not found (cannot connect to class '%s')\n", target, targetname.c_str(), ent->getClassname());
|
||||
} else {
|
||||
ScriptError("SplinePath::CreatePath: target %s not found\n", target);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue