Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-12 08:14:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-12 08:14:12 +0400
commit4bd0a2ba2dadee66d52f9a1101ee918f1327eec4 (patch)
treeb567b077039e78467e21548c5e03fa8b94fc2b6c /source/blender/blenkernel/intern/boids.c
parent471a86bf9ccae23b63cb1a05c9525ef99987581d (diff)
replace VECCOPY -> copy_v3_v3, added copy_v*_v*_short too for typesafe copying, some parts of the code are copying float -> short normals without scaling. fix coming next.
Diffstat (limited to 'source/blender/blenkernel/intern/boids.c')
-rw-r--r--source/blender/blenkernel/intern/boids.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index a0f38e675f9..3966caa1fa9 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -156,8 +156,8 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
if(rule->type == eBoidRuleType_Goal && boids->options & BOID_ALLOW_CLIMB && surface!=0.0f) {
if(!bbd->goal_ob || bbd->goal_priority < priority) {
bbd->goal_ob = eob;
- VECCOPY(bbd->goal_co, efd.loc);
- VECCOPY(bbd->goal_nor, efd.nor);
+ copy_v3_v3(bbd->goal_co, efd.loc);
+ copy_v3_v3(bbd->goal_nor, efd.nor);
}
}
else if(rule->type == eBoidRuleType_Avoid && bpa->data.mode == eBoidMode_Climbing &&
@@ -869,7 +869,7 @@ static void boid_climb(BoidSettings *boids, ParticleData *pa, float *surface_co,
{
BoidParticle *bpa = pa->boid;
float nor[3], vel[3];
- VECCOPY(nor, surface_nor);
+ copy_v3_v3(nor, surface_nor);
/* gather apparent gravity */
VECADDFAC(bpa->gravity, bpa->gravity, surface_nor, -1.0f);
@@ -1345,7 +1345,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
{
boid_climb(boids, pa, ground_co, ground_nor);
//float nor[3];
- //VECCOPY(nor, ground_nor);
+ //copy_v3_v3(nor, ground_nor);
///* gather apparent gravity to r_ve */
//VECADDFAC(pa->r_ve, pa->r_ve, ground_nor, -1.0);