Changeset 1246
- Timestamp:
- 05/20/23 16:33:27 (18 months ago)
- Location:
- cpp/frams/genetics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/geneprops.cpp
r1242 r1246 136 136 } 137 137 138 void GeneProps::propagateAlong(bool use_f1_muscle_reset_range )138 void GeneProps::propagateAlong(bool use_f1_muscle_reset_range, GenePropsOps* ops) 139 139 { 140 140 length = 0.5 * length + 0.5 * standard_values.length; … … 149 149 muscle_power = 0.8 * muscle_power + 0.2 * standard_values.muscle_power; 150 150 151 normalizeBiol4(); 151 if (ops == NULL) 152 ops = getStandardOps(); 153 if (ops->use_normalizebiol4) normalizeBiol4(); 152 154 153 155 if (use_f1_muscle_reset_range) … … 267 269 use_normalizebiol4 = false; 268 270 auto fields = { length,curvedness,weight,friction,muscle_power,assimilation,stamina,ingestion,twist,energy,cred,cgreen,cblue }; 269 for (auto x: fields)270 { 271 auto xx = dynamic_cast<GenePropsOp_Old*>(x);272 if ( xx)273 xx->change = xx->revchange = 0.5;271 for (auto f : fields) 272 { 273 auto f_gpo = dynamic_cast<GenePropsOp_Old*>(f); 274 if (f_gpo) 275 f_gpo->change = f_gpo->revchange = 0.5; 274 276 } 275 277 } -
cpp/frams/genetics/geneprops.h
r1245 r1246 162 162 * @param use_reset_range true if this method should modify muscle_bend_range (used in f1 conversion). 163 163 */ 164 void propagateAlong(bool use_f1_muscle_reset_range );164 void propagateAlong(bool use_f1_muscle_reset_range, GenePropsOps* ops = NULL); 165 165 }; 166 166
Note: See TracChangeset
for help on using the changeset viewer.