49 sceVu0FVECTOR direction;
51 sceVu0CopyVector(target, CharaMain.
pos);
54 this->
angle += 0.31415927f;
56 if (this->
angle >= TWO_PI) {
57 this->
angle -= TWO_PI;
60 for (
int i = 0; i < STEAL_ITEM_MAX; i++) {
61 int state = this->state[i];
65 this->
speed[i] += 0.05f;
67 this->
phase[i] += 0.034906585f;
69 direction[0] = target[0] - this->
pos[i][0];
70 direction[1] = target[1] - this->pos[i][1];
71 direction[2] = target[2] - this->pos[i][2];
73 sceVu0Normalize(direction, direction);
74 sceVu0ScaleVectorXYZ(direction, direction, this->
speed[i]);
75 this->pos[i][0] += direction[0];
76 this->pos[i][1] += direction[1];
77 this->pos[i][2] += direction[2];
79 if (this->
phase[i] >= HALF_PI) {
80 this->state[i] = STEAL_ITEM_HOME;
86 if (DistVector(target, this->pos[i]) <= 5.0f) {
87 this->state[i] = STEAL_ITEM_ARRIVED;
91 this->
speed[i] += 0.02f;
92 direction[0] = target[0] - this->pos[i][0];
93 direction[1] = target[1] - this->pos[i][1];
94 direction[2] = target[2] - this->pos[i][2];
96 sceVu0Normalize(direction, direction);
97 sceVu0ScaleVectorXYZ(direction, direction, this->
speed[i]);
98 this->pos[i][0] += direction[0];
99 this->pos[i][1] += direction[1];
100 this->pos[i][2] += direction[2];
103 case STEAL_ITEM_ARRIVED:
106 case STEAL_ITEM_NONE: