Perhaps this will work better for you?
#include \"DarkGDK.h\"
#include \"g_def.h\"
enum IDImportant{
SKYBOX=1,
PLAYER,
PLAYER_IDLE,
PLAYER_AIM
};
enum IDMisc{
MATRIX=3
};
void DarkGDK(void)
{
dbSyncOn();
dbSyncRate(0);
dbLoadObject(\"media/skyboxes/sky05/sky05.x\", SKYBOX);
dbScaleObject(SKYBOX, 30000, 30000, 30000);
dbMakeMatrix(MATRIX,200,200,100,100);
dbLoadObject (\"media/models/playermodel/H-GI-Static.x\", PLAYER);
dbAppendObject(\"media/models/playermodel/H-GI-Idle.x\", PLAYER_IDLE, 1); //<-----HERE
dbAppendObject(\"media/models/playermodel/H-GI-Attack.x\", PLAYER_ATTACK, 1);
dbRotateObject(PLAYER,
0,
180,
dbCameraAngleZ());
dbPositionObject(PLAYER,
dbCameraPositionX()-1.0f,
dbCameraPositionY()-2.0f,
dbCameraPositionZ()+4.5f);
dbLockObjectOn(PLAYER);
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
while(LoopGDK())
{
dbPositionObject(SKYBOX,
dbObjectPositionX(PLAYER),
dbObjectPositionY(PLAYER),
dbObjectPositionZ(PLAYER));
if(dbKeyState(KEY_W))
dbMoveCamera(1);
if(dbKeyState(KEY_A))
dbMoveCameraLeft(0, 1);
if(dbKeyState(KEY_S))
dbMoveCamera(-1);
if(dbKeyState(KEY_D))
dbMoveCameraRight(0, 1);
if(dbMouseClick()==2)
{
dbPlayObject(PLAYER_AIM, 1, 40);
}
fCameraAngleX = dbWrapValue(dbCameraAngleX() + dbMouseMoveY() * 0.9f);
fCameraAngleY = dbWrapValue(dbCameraAngleY() + dbMouseMoveX() * 0.9f);
dbXRotateCamera(fCameraAngleX);
dbYRotateCamera(fCameraAngleY);
if dbObjectPlaying(PLAYER_IDLE) = 0
dbLoopObject(PLAYER_IDLE); //<-----HERE
dbSync();
}
return;
}
If that works then it's because you're restarting the animation to the first frame every loop.
I'd test it before posting but I broked my compiler.... sorry.