### AIPlayer Spinning[Solved]

Expanding and utilizing the engine via C++.

#### Re: AIPlayer Spinning

TorqueFan
Posts: 130
Joined: Thu Apr 30, 2015 5:35 am
@
Azaezel

So nice of you to post this up on Christmas. I had suspected something getting lost over the wire, but I took it for granted the Player class was already passing along a rotation value. Chances are if that didn't exist already, the older versions I've reverted to didn't pass it along either.

As of yet I hadn't been able to replicate the issue using the older versions of AIPlayer/Player, but I will definitely give this a shot using the current versions as well. If I had to pick between the two, I'd prefer the newer version of AIPlayer because all updates have been useful. Still can't believe I hadn't thought to check if Player was passing a rotation variable across the wire, as essential as rotation is to my specific implementation. Perhaps it wasn't as necessary prior to the AIPlayer datablock and additional poses being added.

In any case, with this bug stomped out we've reached alpha with our current project so still plenty of time for updates/improvements(internally we term 'alpha' as bug-free, concept fully functional, working on visual polish and added features).

I'll post back here when I get around to plugging this into the newer AIPlayer class and running it through the gauntlet. For science!

#### Re: AIPlayer Spinning

TorqueFan
Posts: 130
Joined: Thu Apr 30, 2015 5:35 am
@ Azaezel
I finally found the issue. Bear in mind this is using T3D v3.10.1. Actually the pack/unpack methods already included the rotation.

Since I had deduced that the older version worked, I went through the motions of plugging in the updates one at a time to find the culprit. It ended up being this:

In aiPlayer.cpp:
void AIPlayer::updateMove(const Move* move)
{
if (!getControllingClient() && isGhost())
return;

Parent::updateMove(move);
}

Removed that method from the source and issue is gone. It appears all this really does is make a check for controlling client and ghost, then calls the original Player class' updateMove(). In my case the camera is the control object, so this here breaks the move or some such shenanigans for me I guess. Anyhow, issue resolved, and I didn't have to revert after all. Glad you posted something about it, since I woulda just carried on using the older version had I not took another peek At least now we've got it cornered.

#### Who is online

Users browsing this forum: No registered users and 6 guests