Skip to content

Commit

Permalink
Random crows spawn position
Browse files Browse the repository at this point in the history
Now they won't fly from one point on the ground
  • Loading branch information
Xottab-DUTY committed Apr 6, 2019
1 parent 917441d commit 0903072
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cs/engine/xrGame/ai/crow/ai_crow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ BOOL CAI_Crow::net_Spawn (CSE_Abstract* DC)
// disable UpdateCL, enable only on HIT
processing_deactivate ();
VERIFY2( valid_pos( Position() ), dbg_valide_pos_string(Position(),this,"CAI_Crow::net_Spawn") );

Fvector tmp = Actor()->Position();
tmp.x = tmp.x + ::Random.randF(-50.0f, 50.0f);
tmp.y = tmp.y + ::Random.randF(20.0f, 50.0f);
tmp.z = tmp.z + ::Random.randF(-50.0f, 50.0f);
Position().set(tmp);

return R;
}

Expand Down

0 comments on commit 0903072

Please sign in to comment.