BGE: Fix for T42341 Sensor.frequency is badly named
"Frequency" parameter is renamed to "Skip" in the LogicBricks sensors as it represents skipped frames between pulses. Naming something (frequency) the exact opposite of what it represents (period) was the worst choice. Also, a new BGE python attribute 'skippedTicks' was introduced. 'frequency' attribute is maintained but deprecated. Internally, freq variable is used yet at DNA_Sensor to maintain compability and to avoid do_versions. Thanks to Sybren for the investigation. {F162440} Reviewers: campbellbarton, sybren, moguri, hg1 Reviewed By: sybren, hg1 Differential Revision: https://developer.blender.org/D1229
This commit is contained in:
@@ -107,7 +107,7 @@ bool SCA_RandomSensor::Evaluate()
|
||||
|
||||
bool evaluateResult = false;
|
||||
|
||||
if (++m_interval > m_pulse_frequency) {
|
||||
if (++m_interval > m_skipped_ticks) {
|
||||
bool drawResult = false;
|
||||
m_interval = 0;
|
||||
if (m_iteration > 31) {
|
||||
|
Reference in New Issue
Block a user